Controlling Your World One Contact At A Time  

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.

  1. I always use Stage programming for communication. It allows sequencing reads and writes very easily.
  2. We wait until the 'port busy' flag is off to start a new command.
  3. 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 Hz )
  4. Now the actual command:
    1. The 'Port Number' is fixed, the bottom port.
    2. The 'Slave Address' is the address of the drive. We'll assume '1' for now
    3. The 'Function Code' is 'Preset Single Register'. We're only writing one item
    4. 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
    5. The 'Start Master Address' is the local address we set up above for the information
    6. The 'Number Of Elements' is not applicable because the command itself sets the number
    7. Use the '584/984' mode to allow the size of the address
    8. You can choose another buffer to store an error response but the default is fine with me
  5. 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.
Here is the documentation of the addressing scheme when using MODBUS with CT drives.

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

Copyright © 2005, 2006, 2007 Bernard Carlton