Have some questions regarding sending and receiving ASCII strings. I'm using a DL260 processor and a series of RS-485 devices that I want to talk to. I know what I need to send and what I should receive from the program point of view, but I'm not clear on the syntax of the instructions.
The process is this: I'm getting a digital input to tell me there is an error in one of the devices, and I need to poll it, get a status word back, and convert it to a hex number so I can look at the individual bits to see what the errors are. I only want to run these routines when there is an error, so I was thinking of putting them in subroutines that run only on the leading edge of the corresponding input going high.
First, after getting the input, I'm sending a string to the offending device using the PRINT box. This appears to be able to be a trigger once and it executes instruction. So far so good.
Next, I expect an answer back and use the AIN box to get it. Do I need to hold the input line to it high while that executes? Or is it like the PRINT box and I only need to trigger it once and it runs on it's own until it gets the data or times out?
The answer I get is going to be a series of numbers that AEX should be able to convert to a number. Again, do I have to hold the input high or just trigger it once?
Also, between each of these there needs to be a slight delay - but I'm also trying to run the subroutine only once. Is there a way to do that or do I need to keep running the subroutine until the sequence is complete?
This is the first time I've needed to use ASCII functions in a PLC program, and as luck would have it on my first project with the Automation Direct PLC (I'm used to Toshiba T-series). I know it can get there and a general idea how, but in switching platforms I'm finding a lot of gaps in my knowledge!