Author Topic: Sample App New Multistate with Designer and import/export  (Read 18213 times)

Phrog30

  • Guest
Sample App New Multistate with Designer and import/export
« on: April 20, 2018, 11:51:45 AM »
This is a work in progress.  I have polished my multistate control a little more.  If you add this control to the form and double-click it will open a designer form, similar to other HMI software packages.  It makes editing properties a lot easier.  I added an import and export feature.  In a test I added over 10,000 states with no problem.  However, this will severely slow down VS during design mode open, closing, and saving.  So, if you have a large amount of states, I recommend exporting, then referencing this file as an INI.  I tested two multistates with over 10,000 states in an INI and the form load and changing was quick.

I tested this app in VS2013 and didn't get any errors, so all you should have to do is export and build the project.  For testing I just used a numeric up/down, but you can assign PLC addresses and that should work as well.

Let me know what you think.

https://drive.google.com/file/d/1qjlMtYEu99RfjormprxVEhwFPzoghRce/view?usp=sharing

James

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #1 on: April 29, 2018, 04:54:34 PM »
I tried it and it seems to be a neat control.

It is possible to add it to the AHMI project, as the attached pictures show, but in a quite a complex way.

Maybe consider making it compact so it could be easily added to AHMI or just persuade Archie to include it.

Importing those 10000+ messages did work, slowed down the VS but was responding quick at Runtime.
« Last Edit: April 29, 2018, 06:58:17 PM by Godra »

Phrog30

  • Guest
Re: Sample App New Multistate with Designer and import/export
« Reply #2 on: April 29, 2018, 09:40:10 PM »
... or just persuade Archie to include it.
I tried already. I'm guessing he's not onboard with it. Personally, I think it's one of the best controls to have, I used it all of the time. But maybe I'm the only one thinking that.

Alipaymax

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #3 on: April 30, 2018, 03:54:24 AM »
I may be contacting you for more information on this issue. It is very interesting.

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #4 on: June 26, 2018, 02:10:45 AM »
hello i really liked the way ur project is

can u put instructions of using it for us beginners

with thanks

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #5 on: June 27, 2018, 06:06:30 AM »
what i mean by instructions is

i am using 4 delta plcs in my project all using modbustcb
so how should i configure ur project
to work with myne
i mean i am gonna move my project inside yours so i can use your controls
( audit , alarm , history , users ,the new modified controls u add to it...)

and one more thing
the ( Who Am I Selection ')
what is it ?

NOTE " MY PROJECT IS WORKING FINE BUT I WANT TO USE YOUR CONTROLS BECAUSE THEY LOOK AND WORK MORE PROFESSIONAL AND I DON`T HAVE DATABASE IN MY PROJECT OR KNOW HOW TO DO IT YET )
with thanks
« Last Edit: June 27, 2018, 06:10:25 AM by oqapsking »

Phrog30

  • Guest
Re: Sample App New Multistate with Designer and import/export
« Reply #6 on: June 27, 2018, 08:16:19 AM »
so how should i configure ur project to work with myne
i mean i am gonna move my project inside yours so i can use your controls
( audit , alarm , history , users ,the new modified controls u add to it...)

I can't answer that, not enough information... not sure about your project and your goals.  Personally, I would merge into Archie's latest beta.  I tried to make it easy by putting all of my stuff inside of a folder, just copy and paste.  Last time I updated it only took 2-3 minutes.

and one more thing
the ( Who Am I Selection ')
what is it ?

This is a remnant of a feature from another project that I left in.  You should probably delete it,
Code: [Select]
Public Shared Who_Am_I As Integerin Class/Globals, then go and delete all of the errors reference.

This was a means to control zones or nodes.  For example, we had 2 HMIs running the same program, but I didn't want the operator to be able to do the same things on each.  Our alarms had a property for zones, which allowed me to show certain alarms for certain zones and allow certain zones to silence or reset alarms.  I could also add a property to a basicbutton, for example, and prevent operation unless in that zone.  Just remember, this sample app I posted was part of a larger application, I tried to delete all non-relevant items, but I'm sure I missed a few.

The goal of the original post was for multistate, it was just to show the control, not really meant to show the whole app.  I included the entire app just to make it easier for people to run it.

I'm working on several projects so I really don't have time to write out detailed instructions on this stuff.  Just do your best and come back with a question or two and I will try and help.  Godra has been very good lately about giving help, so I'm not the only one that can help.  My point, someone should be able to help you.

James

Edit: I can't promise anything, but if you can send me your project I could try and merge files for you.  It depends on several factors.  One thing to answer, how do you have alarm triggers?  My app is really designed for arrays.  So, you will need to decide on triggers.  My app can do alarm descriptions from both a local file, or strings from a PLC, but I never tested with Modbus, so I would just stick to local.  That is easy to do, I can show you if necessary.
« Last Edit: June 27, 2018, 08:38:06 AM by Phrog30 »

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #7 on: June 27, 2018, 10:24:44 AM »
oqapsking,

James offered to possibly do it for you so don't hesitate to send your project to him (if anybody can do it accurate and fast enough it would be James).

Make sure to refine your project and provide all the details so James doesn't waste to much time deciphering it.

Otherwise, doing it bit by bit will be a huge waste of your and everybody else's time.

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #8 on: June 27, 2018, 02:21:59 PM »
thanks guys what i need in my project i already used ctrlbasicbutton the one that u made
so what i need is only to make the connection status for my 4 plc
but i can`t find where to chose its com component and the alarms too
and how to make it read the alarms and audit it for multiple com components
my project is simple but full with images and i would rather to finish it my self so i will be learning in the process
i liked the idea of the audit
so i can see the alarms the system and the users

for the alarms the way i use it is for example i read the value of register (d100)
each value has a meaning for example from 0 to 20
0 = door1 open
1 = door 2 open
and so on
like u use in ur project
but i cant find the area to choose the com component and the plc address and so on

thanks in advance




Phrog30

  • Guest
Re: Sample App New Multistate with Designer and import/export
« Reply #9 on: June 27, 2018, 03:40:38 PM »
There are four main parents.  I had my reasons for doing this, but will not go into now.  This app gives you the ability to run on 4 monitors, hence 4 parents.  However, only the 1st parent has a ComComponent.  So, open up _0000_1st_Parent, and you will see it.  What you can do is delete that, then look at all of the errors and you can see where I was using it.  But, for alarms open the code for 1st parent (F7), then do find (Ctrl + F), search the current document for TODO.  i used TODO as a reference for where user defined stuff is at.  TODO_1 is alarm quantity, you don't need to use this though, you can simply hard code it.  TODO_2 I think is at 16, change to suit your needs.  If your words are 16 bit, then you are fine.  TODO_5 is the trigger array (there multiple places to edit).  I think the app I shared had 40020i, so what I'm doing is starting i=0 - 400200 and going to alarm quantity, let's say for example 3, so 400200, 400201, 400202 (Qty is base 0).  I shove those addresses in a datasubscriber.  TODO_6 is alarm descriptions, you can just comment that out.  You can comment out TODO_8 stuff.

I'm rushed for time, so hopefully that little bit helps...

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #10 on: June 27, 2018, 04:49:15 PM »
oqapsking,

You seem to be after this Multistate control from this topic because it would allow you to specify what PLC to look at and display its active alarms in the form of a message.


Phrog30

  • Guest
Re: Sample App New Multistate with Designer and import/export
« Reply #11 on: June 27, 2018, 05:42:09 PM »
I'm sorry, I didn't realize that's what he was after. Not the first, or last, time I've not understood. :)

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #12 on: June 27, 2018, 06:41:02 PM »
Yes and i used it but sadly for i am new in vb i didn't know how to use it with a database or to add it to the audit page and the history page the idea in my head is to use a multistate control for each plc then connect them with the audit page and the history page
And i couldn't do  the connection status for each plc i hope u guys can put me in the right direction
With thanks

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Sample App New Multistate with Designer and import/export
« Reply #13 on: June 27, 2018, 07:33:30 PM »
If James is still willing to look at your project then you should definitely zip it up and send it to him.

Phrog30

  • Guest
Re: Sample App New Multistate with Designer and import/export
« Reply #14 on: June 28, 2018, 12:32:40 AM »
The multistate I did will only show one state at a time. Is that desirable for you? Probably could have 4 separate data subscriptions and look up tables?

I guess I'm still a little lost on what you are trying to accomplish. Sorry, just have a lot on my mind right now.