Can you give me some general guidelines for configuring DF1 communications?
Here are some notes which should help you develop your application.
- See the TeleBUS DF1 Protocol User Manual within the TelePACE manual for details.
- Ensure the SCADAPack has the DF1 option enabled. Check this using Firmware Loader. If it does not, you can contact your Control Microsystems Dealer (Simark Controls) who will help you add the option. They will need to know the controller ID (A######) and the current options in the controller.
- In the TelePACE program, select Controller | Serial Ports, then the port which will be used. Select the desired DF1 protocol along with the other com parameters.
- Any of the following 5 commands may be used from the PLC5: Unprotected Read, Unprotected Write, Protected Write, Protected Bit Write, Unprotected Bit Write. See the Slave Mode section of the TeleBUS manual. It describes the allowable commands in detail, and how many words may be sent with each command. The paragraph entitled Function Codes also states "Note that slave commands at the protocol layer access the I/O database in physical byte addresses."
- The I/O Database section of the TeleBUS manual describes the crossmapping between Modbus and DF1 addresses. Here is a summary: Coils (0xxxx) are accessed using DF1 (16 bit) addresses 0 - 255, providing 4096 coils. Status registers (1xxxx) are accessed using DF1 (16 bit) addresses 256 - 511. Input registers (3xxxx) are accessed using DF1 addresses 512 - 1535. Holding registers (4xxxx) are accessed using DF1 addresses 1536 - 11534. See the complete tables (there's a separate table for the SP32) in the section Accessing the I/O Database using TelePACE | DF1 Addressing. Conversion formulas are included below the tables.
- The SCADAPack by default uses com port settings of 9600, 8N1, no handshaking. Ensure com 0 on the PLC5 is set to match. Handshaking may be added if required.
- In the PLC5's MSG instruction, ensure that the correct Local Station Address (the SCADAPack) is used. This is the station number set up in Controller | Serial Ports.
- In the MSG setup, the Data Table Address may include any valid address and file in the PLC. The Target Device's Data Table Address will be the DF1 address as determined above.
- Ensure that the MSG function is only executed as often as necessary. Polling too quickly may cause communication failures.
- According to the PLC5 MSG instruction help, the MG control block must be used if a message is to be sent out any port other than channel 1A. Eg MG10.