Hi,
I have a serial device that I need to communicate with but I am not sure if I can use drvAsyn/devGpib to handle it. I am running EPICS v3.14.5 on Linux.
The device is a PC that runs a 3rd party program that controls a sample wheel that forms part of an ion source.
Sending a command from the IOC to the ion source PC commonly produces 4 responses.
For example say the IOC sends the following command to the ion source PC:
"LOAD06"
The IOC can expect the following 4 responses when the command is handled successfully:
"LOAD06"
"VALIDC" # The first two responses return almost immediately.
"SAMPLE" # We may have to wait up to 30 secs for this to come in.
"OKDONE" # Then we have to wait up to 30 secs again for this last response to arrive.
Most of the commands we send to the ion source PC will produce responses similar to this example, except the times we can expect to wait for the responses are different. In some cases all 4 will come in within 2 seconds. Sometimes we may have to wait around 4 seconds for the responses to arrive.
If the above load command could not successfully complete we may receive 2 responses or 4 responses (depending on the problem).
Another command will produce a large amount of textual information.
For example if we send:
"INFSAM"
Then we can expect the following responses:
"VALIDC"
Then 7 lines of information (each terminated by "\r\n"):
Up to 6 chars
Up to 30 chars
Up to 20 chars
1 char
2 chars
1 char
2 chars
Then to finish off:
"OKDONE"
1. Can I use drvAsyn/devGpib to handle this device? If I write my own device support should I look to use drvAsyn underneath it?
2. What record type could I use to handle the last example command?
Thanks,
Damien