TheCaptain2000
Lifetime Supporting Member
In changing from an S5 to an Allen Bradley 5/04, I need to figure out how to convert an integer to an 8-bit or 16-bit binary format. I need to be able to output this binary code on a 8pt or 16pt output card to be read by a pre-existing pre-programmed alpha-numeric display built by the OEM of the machine.
For example, if there is nothing to display on the OEM display, the integer 0 is in play thus showing 0000 0000 on the AB output card.
Next, if the E-Stop is engaged, the integer 1 is in play, thus showing 0000 0001 on the AB output card. The display then shows the "Emergency Stop Engaged".
When the integer 2 is in play...0000 0010 is on the output...another message is displayed...and so on.
I know I can make an HMI do all this work all day long, but this has become a personal learning mission of mine along with trying to keep the operators workstation the same as before keeping the users learning curve to a minimum.
I have seen examples in the forum before where I could just MOV or COP the integer directly to the output card, but it does not work for me.
Also, I am currently using a counter/timer combination to cycle the messages in the common event there are multiple messages to display. How can I program to show only the messages that are needed versus just skipping the unneeded pre-programmed messages and cycling through the 30 or so messages by either showing or hiding each individual messages? I would imagine not using a counter for this, but perhaps a FLL (Fill) instead...thoughts?
For example, if there is nothing to display on the OEM display, the integer 0 is in play thus showing 0000 0000 on the AB output card.
Next, if the E-Stop is engaged, the integer 1 is in play, thus showing 0000 0001 on the AB output card. The display then shows the "Emergency Stop Engaged".
When the integer 2 is in play...0000 0010 is on the output...another message is displayed...and so on.
I know I can make an HMI do all this work all day long, but this has become a personal learning mission of mine along with trying to keep the operators workstation the same as before keeping the users learning curve to a minimum.
I have seen examples in the forum before where I could just MOV or COP the integer directly to the output card, but it does not work for me.
Also, I am currently using a counter/timer combination to cycle the messages in the common event there are multiple messages to display. How can I program to show only the messages that are needed versus just skipping the unneeded pre-programmed messages and cycling through the 30 or so messages by either showing or hiding each individual messages? I would imagine not using a counter for this, but perhaps a FLL (Fill) instead...thoughts?