senorkitty
Member
Hello!
I'm trying to write a very small program for a Micro830 PLC (pretty much the only PLC our shop has installed) that will a) listen for ascii strings from a computer program, b) parse those strings, and c) turn on/off certain outputs.
The length of the ascii strings from the computer are NOT fixed, so I need to use an ACB block (read buffer length) command to first determine the length of the received string. From there, I want to activate an ARD block (read characters from the input buffer) to get the string and run it through a set of comparison blocks.
I've got a whole bunch of questions and am pretty frustrated with getting this to work.
First, how do I activate ACB every cycle? It requires a rising edge, so I have been switching a boolean on and off (which means ACB is activated every other cycle). Ideally, I'd just like it to run every cycle.
Second, when ACB is first activated, it's output (Q) goes from False to True. But after the first time, Q just stays True. That means that I'm unable to activate ARD more than one time (it too needs a rising edge). Is there some way to reset Q every cycle? Or do I have to come up with another way to create a rising edge after ACB finishes every cycle?
Any help would be appreciated!
Thank You!!
I'm trying to write a very small program for a Micro830 PLC (pretty much the only PLC our shop has installed) that will a) listen for ascii strings from a computer program, b) parse those strings, and c) turn on/off certain outputs.
The length of the ascii strings from the computer are NOT fixed, so I need to use an ACB block (read buffer length) command to first determine the length of the received string. From there, I want to activate an ARD block (read characters from the input buffer) to get the string and run it through a set of comparison blocks.
I've got a whole bunch of questions and am pretty frustrated with getting this to work.
First, how do I activate ACB every cycle? It requires a rising edge, so I have been switching a boolean on and off (which means ACB is activated every other cycle). Ideally, I'd just like it to run every cycle.
Second, when ACB is first activated, it's output (Q) goes from False to True. But after the first time, Q just stays True. That means that I'm unable to activate ARD more than one time (it too needs a rising edge). Is there some way to reset Q every cycle? Or do I have to come up with another way to create a rising edge after ACB finishes every cycle?
Any help would be appreciated!
Thank You!!