AdvancedHMI Software
General Category => Application Showcase => Topic started by: Phrog30 on February 03, 2019, 09:08:33 PM
-
There have been a few requests for a multistate that works with bit arrays. Here is a rough draft. This control can use values, LSB, or bit arrays. Values will only show one value at a time. LSB will only show one value at a time... the LSB. However, bit will cycle through all high bits in the array. You can still take advantage of embedded variables and the state colors and options. I didn't work out what to show for word 0 bit 0, maybe I can add a default message?
https://drive.google.com/file/d/1jmsMc-JoSFKvO-EJsQZ71nrA1HYimoFv/view?usp=sharing (https://drive.google.com/file/d/1jmsMc-JoSFKvO-EJsQZ71nrA1HYimoFv/view?usp=sharing)
It was done while watching the superbowl, so expect a bug or two. I installed the control in Archies beta v18. Download, rebuild, and you should be good to go. I tested with ModbusSim. I used ini file, which is also included.
-
I've succesfully add it to my project :D Man I wish I were as good as you are !
Works perfectly !
-
All credit goes to Archie. All I did was add to his stuff, and it's pretty hacked up. I don't think I really did it correctly. It should behave like LSB, but cycle through all bits high. It does cycle, but I think it's one bit off, on the low side. Which makes sense because you should be able to set a message for state 0, this would be the state where no bits are high. So, try making a change, in AdvancedHMI, purchased folder, select ctrlMultistate and hit F7 to open code. Go to line 403 and 404, change "b + Binary_Offset" to b + 1 + Binary_Offset". Should look like this...
If IsNumeric(b + 1 + Binary_Offset) Then
dr("#") = b + 1 + Binary_Offset
End If
Let me know what you think. Also, I suggest using the ini where possible. I think it's lighter weight and faster, especially if you have a lot of states. The easiest method is add a few states in development, then export. Use this file and edit in excel or something. You can bang a file out quick.
If you like the change, I will edit the code and repost.
-
I’ll try that tonight !
For the ini file , I don’t know what i’m doing wrong but it just don’t work.. For now I just load the txt and edit in the designer but if you reload it, you lost your blinking settings. Will give a another look !
Thanks Phrog! and hats down to you Archie ;)
-
If the path isn't correct, the INI will not work.
If you import the INI it will overwrite everything. If you have under a couple hundred states, doing it in the designer will be fine.
-
I've inclued Alarm.txt in my project in folder \Purchased
So the path must be Purchased\Alarm.txt , but always getting Undefined message bit etc..
In the alarm.txt each line is like ; 1,QUAD: ALARME MOTEUR POMPE HYDRAULIQUE ENTRAINEMENT,,-65536,,-16777216,True
I got over 1000 states
I've also tried to put in the main folder and try .\Alarme.txt , \Alarme.txt , Alarme.txt
-
If you created a folder under AdvancedHMI project called "Purchased", and your file is called "Alarm.txt", the path should be "Purchased\Alarm.txt". So, sounds like you had the correct path. Make sure you set copy to output directory to copy if newer or copy always. See attached photo.
-
Thanks Phrog ! Working now ;)
-
Thanks Phrog ! Working now ;)
Glad to hear. See any issues so far? Was that what you were looking for?
-
Exactly what I'm looking for !! And no issues ;D
Thanks again !
-
HELLO
AND THANK U FOR SHARING
BUT I HAVE A PROBLEM
I EXTRACTED THE FILE
THEN STARTED IT
REBUILD THE PROJECT
BUT GIVES MULTIPLE ERRORS
AS IN THE PHOTOS
-
HELLO
AND THANK U FOR SHARING
BUT I HAVE A PROBLEM
I EXTRACTED THE FILE
THEN STARTED IT
REBUILD THE PROJECT
BUT GIVES MULTIPLE ERRORS
AS IN THE PHOTOS
You added the reference? It looks like you did. The error is related to the reference in some way. I'm limited on time until Monday.
-
That yellow triangle with exclamation mark indicates that something is missing and needs to be resolved first.
It probably relates to incorrect file path or inability to locate the file.
Maybe remove it and then manually browse to it to add it again.
-
i didn`t add or remove anything
just extracted the files and rebuild the project
-
I just did the same and got the same errors since the AHMIClassLibrary.dll file is missing.
You can get it from the other project: https://www.advancedhmi.com/forum/index.php?topic=2079.0
It is inside AdvancedHMI/MyHMI/DLL folder.
-
I'm not able to look, but the dll should be part of the project.
-
Here's the file, just in case...
-
thanks for your replay and help Phrog30 and Godra
am trying to use your interface mr Phrog30 for my project
but i have few problems i need your help with them
i will send you my file in the messages and i hope you can help me if you can spare some time for me
-
Yep, happy to help. I haven't seen any message yet, but I'll be on the lookout.
-
i just sent it thanks
-
I have to go on a startup, so I will try and help if time permits...
-
at this time i will continue building my project as it was
after i finish it i will send you a copy and tell you what i need your help with
and thanks in advance