jspx
Member
Hi All,
I wonder if someone can help me out here - I have a main output subroutine, which I will be calling whenever I have to write to the output ports. The outputs drive an externa; logic board - the lower 4 bits are the data and the upper 4 bits are the address of the external latch that needs the data and there is also a strobe line. So what I do is write out the data to the 8 bits and toggle the strobe low then high, then exit the subroutine. The problem occurs when I have a list of values to output - the first one gets loaded into the accumulator and then the subroutine is called. The output lines change, although not immediately - I guess the output happens at the end of the current scan. Anyway, then the next value gets loaded and the subroutine is called again and so on. What's happening is the timing seems to be screwed up - the outputs don't seem to change in an orderly fashion at all - in fact it just all seems to happen at once or something like that.
I called tech support for the plc and they told me to use the Output Immediate instruction but my cpu doesn't support it.
I've tried inserting a timer in the subroutine, just after the write to output but it doesn't help much.
Has anyone else had a similar problem and fixed it?
I'm using an Automation Direct DL205 system with a DL240 cpu.
Many thanks for any advice you can offer.
Jeremy
I wonder if someone can help me out here - I have a main output subroutine, which I will be calling whenever I have to write to the output ports. The outputs drive an externa; logic board - the lower 4 bits are the data and the upper 4 bits are the address of the external latch that needs the data and there is also a strobe line. So what I do is write out the data to the 8 bits and toggle the strobe low then high, then exit the subroutine. The problem occurs when I have a list of values to output - the first one gets loaded into the accumulator and then the subroutine is called. The output lines change, although not immediately - I guess the output happens at the end of the current scan. Anyway, then the next value gets loaded and the subroutine is called again and so on. What's happening is the timing seems to be screwed up - the outputs don't seem to change in an orderly fashion at all - in fact it just all seems to happen at once or something like that.
I called tech support for the plc and they told me to use the Output Immediate instruction but my cpu doesn't support it.
I've tried inserting a timer in the subroutine, just after the write to output but it doesn't help much.
Has anyone else had a similar problem and fixed it?
I'm using an Automation Direct DL205 system with a DL240 cpu.
Many thanks for any advice you can offer.
Jeremy
Last edited: