Hi,
It is staring you in the face!
But that technote can make for confusing reading?
When you use "Custom" service "
32", the MSG instruction configuration options change to allow you to enter both Send & Receive addressing for a Scattered
Read. Here, the Send addressing is used to send the parameter numbers to the drive for the values the user wishes to read. You manually enter these parameter numbers into your Send addresses (every 2nd word as per example). The MSG then reads the values from these specific parameters in the drive into the assigned Receive addresses in the controller. The Receive addressing will populate the parameter numbers in a similar sequence to the manual sequence you use in the Send addressing (every 2nd word). The values of the parameters to be read are stored in every other word address.
Likewise, when you use "Custom" service "
34", the MSG instruction configuration options change to allow you to enter both Send & Receive addressing for a Scattered
Write. The difference here is the Send addressing is used to send both the parameters to be written to, and the values to be written. Similarly, the 1st address is the parameter number and the following word is the value to be written. The Receive addressing is used for confirmation. The parameter numbers to be written to are automatically populated in the Receive addressing in a similar sequence to the Send addressing. Each following word represents the reply from the write command. This will be either a 0 or a 1. A value of 0 means the write was successful. A value of 1 means there was some error.
However many parameters there are between b006-b020, you require double that number of words in both your Send and Receive addressing. That is assuming all those parameters are 16-bit values.
Example:
There are 15 x 16-bit parameters to read
You create/assign Send Data File N10 with 30 elements (words N10:0 - N10:29)
Send:
N10:0 = 6 (user assigned value representing param b006)
N10:1 = 0 (leave blank)
N10:2 = 7 (user assigned value representing param b007)
N10:3 = 0 (leave blank)
...and so on up to...
N10:28 = 20 (user assigned value representing param b020)
N10:29 = 0 (leave blank)
You create/assign Receive Data File N11 with 30 elements (words N11:0 - N11:20)
Read:
N11:0 = 6 (MSG assigned value representing param b006)
N11:1 = 5 (param b006 value read from drive)
N11:2 = 7 (MSG assigned value representing param b007)
N11:3 = 10 (param b007 value read from drive)
...and so on up...
N11:28 = 20 (MSG assigned value representing param b020)
N11:29 = 3 (param b020 value read from drive)
The size in bytes you enter for Send and Receive will be double the number of words (1 byte = 1/2 word).
If you are following the example, then the parameter numbers for the scattered Read are assigned in the Send N13 Data File in every 2nd word address. Note though that there are only 10 elements available. If attempting to read more parameters than the example 5, then you can increase the number of elements for the Data File while changing the parameter numbers to suit. You must likewise increase the number of elements in the Receive Data File to match but do not need to edit any values in this Data File.
The "skipping" of the addresses for the parameter numbers, leaving every other address at 0, is the tricky, or possibly confusing part here. So I advise you to pay close attention to that aspect of the configuration.
capisce?
Regards,
George