uptown47
Lifetime Supporting Member
Hi
I'm trying to make messages cycle on a display.
My marker double word holding the messages is MD100.
If I have more than one bit of MD100 on I would like to show the corresponding message for 2 seconds and then move on to the next message.
For instance... MB103 equals ...00001011
Then I would like M103.0 to be on for 2 seconds, then M103.1 and then M103.3.
I have tried to make a (pathetic) start to an FB that will allow me to pass in the MD and give me the correct Marker bits as an output every 2 seconds but I've come to an ungraceful stop unfortunately.
Here's what I've got so far...
I wondered if anyone can point me in the right direction on how to go about this.
Many thanks
;-)
I'm trying to make messages cycle on a display.
My marker double word holding the messages is MD100.
If I have more than one bit of MD100 on I would like to show the corresponding message for 2 seconds and then move on to the next message.
For instance... MB103 equals ...00001011
Then I would like M103.0 to be on for 2 seconds, then M103.1 and then M103.3.
I have tried to make a (pathetic) start to an FB that will allow me to pass in the MD and give me the correct Marker bits as an output every 2 seconds but I've come to an ungraceful stop unfortunately.
Here's what I've got so far...
Code:
L 1
T #MASK
M001: L #MESSAGE_WORD_1
L #MASK
AW
JP MESS
JU M002
MESS: L #MESSAGE_WORD_1
LAR1
// SOMEHOW TRANSMIT OUT OF THE BLOCK THE BIT THAT IS ON FOR 2 SECS
L #MESS_TIME
SE T 99
NOP 0
NOP 0
NOP 0
A T 99
// = M #MESSAGE_WORD_1.BIT ??
M002: L #MASK
SLD 1
T #MASK
// SOMEHOW CHECK IF WE HAVE CHECKED EVERY BIT OF #MASK
JU M001
I wondered if anyone can point me in the right direction on how to go about this.
Many thanks
;-)