Jump to content

Recommended Posts

Posted

I have an interesting problem here... In my program 'OperatorMessages' I use MOVE logic to receieve an integer, and display the visibility of the bit if its ON/OFF, this is stored on a datalamp which displays a color for whatever bit is triggered via HMI (help2.png). 

I have 2 tags here, HMI.MessageLT and HMI.FuncMSG, they are both under the same UDT and are both INTS.

help.png.e0ad79100b8a8f0af3acf750fad2c1b

You can see that when Machine.Mode.Auto is SET HMI.MessageLT holds the INT value.When Logic to the Left is RESET the INT value is placed back to 0.

help4.png.6c0eb98dc2a4c7c8e969e194e2b400help5.png.61b7e8cf56b5b6dfa98d8ddaf34bc5

So my HMI.MessageLT is working perfectly,

BUT the HMI.FuncMsg does not reset its bits. (images below)

help6.png.45082896cd63cd4e7193a127a85819help7.png.13bb74f7ada95a82fe7e13223d1711

So you can probably image that on my HMI Data lamps, the DataLamp which takes HMI.MessageLT as a variable dissapears and reappears accordingly with the triggered bits, but the DataLamp which takes HMI.FuncMSG is not dissapearing, so when RESET it still displays as if there is an error because the bit is not resetting. Headache.

help2.png

help3.png

help4.png

help6.png

help6.png

Posted
On 07/06/2024 at 9:32 AM, Str8jCkt said:

This would be a hard one for someone to debug given just those snippets of code.

Think anyone would need to sort thru the logic to find out what is actually going on

I second this.

 

If I had to take a stab at it, either there is a problem with the reset logic for HMI_FuncMsg or this same variable is being written from somewhere else.......

  • Like 1
Posted

You must be writing the 0 to HMI.MessageLT... Integers do NOT go back to zero when the logic is false like bits do.  The MOVE is simply not happening anymore, and the value remains at what it was set to last...  So if you want to to be zero, YOU NEED TO WRITE ZERO TO IT.

You might also want to consider pulsing those MOVE instructions, is there really any reason to do it every program scan?

Posted

You must be writing the 0 to HMI.MessageLT... Integers do NOT go back to zero when the logic is false like bits do.  The MOVE is simply not happening anymore, and the value remains at what it was set to last...  So if you want to to be zero, YOU NEED TO WRITE ZERO TO IT.

You might also want to consider pulsing those MOVE instructions, is there really any reason to do it every program scan?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...