W
Hello all...
I am fairly new to the world of process automation. Could you please assist me with a SLC 5/03 problem.
I am currently writing a sequence for a CO2 dryer. In order to facilitate holding the step on an alarm, I have incorporated JMP and LBL instructions to hold the step and continuously loop backwards should an alarm condition occur.
This would, obviously, cause the watchdog timer to time out though. In order to prevent this I used an MVM on both the High and Low Byte of S:3 (the program scan word), checked the difference between the current program scan and watchdog time, and initiate a temporary end (TND) should the two values be within 2 ms of each other. However, the values I seem to be getting out from the MVM instructions is not at all what I expected.
My suspicion is that the S:3 high and low byte are represented as a byte value from 0-255, while the integer is from -32767 to +32768. Incorporating the low byte value into the integer's bits gives it a negative value. I have tried absoluting it, swapping the bits, importing it into a binary word, etc. all to no avail.
I'm sure I'm just overlooking something simple. Any help would be greatly appreciated. How can I manipulate the bits and integers correctly? If this won't work, what other solutions are possible?
Many Thanks,
Warren Boswell.
I am fairly new to the world of process automation. Could you please assist me with a SLC 5/03 problem.
I am currently writing a sequence for a CO2 dryer. In order to facilitate holding the step on an alarm, I have incorporated JMP and LBL instructions to hold the step and continuously loop backwards should an alarm condition occur.
This would, obviously, cause the watchdog timer to time out though. In order to prevent this I used an MVM on both the High and Low Byte of S:3 (the program scan word), checked the difference between the current program scan and watchdog time, and initiate a temporary end (TND) should the two values be within 2 ms of each other. However, the values I seem to be getting out from the MVM instructions is not at all what I expected.
My suspicion is that the S:3 high and low byte are represented as a byte value from 0-255, while the integer is from -32767 to +32768. Incorporating the low byte value into the integer's bits gives it a negative value. I have tried absoluting it, swapping the bits, importing it into a binary word, etc. all to no avail.
I'm sure I'm just overlooking something simple. Any help would be greatly appreciated. How can I manipulate the bits and integers correctly? If this won't work, what other solutions are possible?
Many Thanks,
Warren Boswell.