AD to CT Modbus Hookup Page 5
Now we look at a rung in the PLC which will transmit a value to the frequency setting in the drive.
Here is the documentation of the addressing scheme when using MODBUS with CT drives.
- I always use Stage programming for communication. It allows sequencing reads and writes very easily.
- We wait until the 'port busy' flag is off to start a new command.
- In my application the desired speed is stored as a BCD but the drive wants it as a
'decimal' or 'binary' (AD's nomenclature) number. Thus the conversion.
Note that the number will have one assumed decimal point ( 234 = 23.4
- Now the actual command:
- The 'Port Number' is fixed, the bottom port.
- The 'Slave Address' is the address of the drive. We'll assume '1' for now
- The 'Function Code' is 'Preset Single Register'. We're only writing one item
- The 'Start Memory Address' is the drive menu and parameter in the form 4MMPP. This is menu 1 item 21.
Be sure to include leading zeroes as necessary
- The 'Start Master Address' is the local address we set up above for the information
- The 'Number Of Elements' is not applicable because the command itself sets the number
- Use the '584/984' mode to allow the size of the address
- You can choose another buffer to store an error response but the default is fine with me
- Finally I jump to the next stage to send the next command to the next drive (this shot was
from a multi drive system with the last stage jumping back to this one). If you only have one drive and
just want to send the speed then remove the jump instruction. This will just keep sending the
speed as often as it can.
The next posting will describe a different method of PLC port parameter setup. Stay tuned.
Go To The Index
Setting up the PLC port
A port setup alternative
© 2005, 2006, 2007 Bernard Carlton