After reviewing the manual I think you are going to want to use Master Mode with Query/Response Transactions.
In the Query you have several options for the Data to use:
If you use the Constants, you set the values in the Anybus, they don’t come from the PLC. You can create static commands, and then trigger them with a trigger byte sent from the PLC. Let’s use ‘Read Version’ as an example from the Veeco manual:
The command format is:
so converting ASCII to hex we have:
[Cmd] [4-ch checksum] [CR]
52 56 [4-ch checksum] 0D
So we can create a Word Constant 0x5256, a Checksum (not exactly sure of the settings for this yet), and then a Byte Constant 0x0D:
And then create a trigger byte at 0x0000 that will send the command when written to:
If you add Data or variable Data (variable refers to length), this is essentially memory space that is mapped to the PLC. So, for example, if your commands are all 10 bytes or less, you could create a variable data space, and trigger it to be sent “on data change” so you could write whatever command you choose from the PLC.
Your response is going to be either an ACK or NAK (with error code):
and the response string for ‘Read Version’ will be in this format:
So :
A or N [1-ch NAK code or vv.vv] , [8-ch Timestamp], [4-ch checksum] [CR] [LF]
You are going to need to use variable data here because you could receive a 1-ch NAK code or a 5-ch version number.
[Data - 1 byte] [Variable Data - 6 byte max with ‘,’ or ‘2C’ end char] [Data 9 bytes (includes ‘,’] [checksum] 0D 0A
if you don’t need to use the checksum, you can just collect all of this as one long variable data object
Here is the .cfg file as an example:
examlpe.cfg (16.0 KB)