Write Message to Trendview recorder via Modbus rev2a 1
Write Message to Trendview via Modbus A Modbus master can write text messages to a recorder PLC, SCADA, HMI Messages appear on the Trendcharts in the User Message log along with a date/time stamp Trendview recorder is a Modbus slave, no credits are needed. The messages can be written over either ethernet (Modbus TCP) or RS-485 (Modbus RTU). All recorders have 16 holding registers in the 4xxxx memory area reserved for messages of up to 32 ASCII characters starting address = 0004, register (4)0005 Recorder configuration: Slave mode must be enabled recorder must be assigned a slave node ID number, 1 247 for Modbus RTU, the RS-485 port must be configured and the settings must match the Master s settings. 2
Trendview Setup Trendview Setup for Modbus RTU over RS-485 does not matter, can be something else 3
Modscan 32 as Modbus Master Modscan 32 Connection setup: USB/RS-485 adapter installed on PC s COM 8 Direct Connection to COM8 matches the COM port shown in Device Manager 4
Modscan 32 Modscan 32 Connection setup: Comm settings under Configuration match Trendview s setup 5
Write Message to Trendview via Modbus Compose message of ASCII character hex values Setup > Extended > Preset Regs 6
Modscan 32 Enter data Slave Device node number (1) Register address 5 = 40005, starting from 40001 Number of registers (points) Number of points should be 4, not 3, for message Cleared 7
Modscan 32 For each register address, enter the hex values for two ASCII characters sample message: Cleared 43 = C 6C = l 65 = e 61 = a 72 = r 65 = e 64 = d 00 = nul To File saves the setup From File loads a previously configured setup Update sends message to slave device 8
Modscan 32 Modscan32 s completed write message transaction for Slave (Device) 1 Address 40005 4 registers (8, 8 bit ASCII characters) 9
Trendview Mark-on-Chart Message Cleared marked on the Trendview chart 10
ASCII Table 11
Banner USB/RS-485 converter cable Banner USB/RS-485 converter cable part number BWA-HW-006 used for Trendview Modbus RTU FTDI chipset registered with Microsoft if installed on PC with internet access, will find drivers and selfinstall Check Device manager to see which COM port the converter installs on 12
Wiring Banner USB-RS-485 converter cable to Trendview X series RS-485 Modbus Trendview Use 5 pin M12 male cordset to adapt Banner M12 5 pin Female connector to flying leads Wire Honeywell connector as shown Black White Gray or green/yellow Banner M12 node connections RS-485 uses white, black & gray Banner 13
Trendview Manual: write message via Modbus Input Text message This facility allows a text message to be passed to the recorder to be annotated on the chart and added to the message log. The maximum length of the message is 32 bytes of ASCII characters, which need not be null-terminated. It operates by utilising modbus function code 16 (0x10), Preset Multiple registers, and the unique address 0x0004 in the Modbus global register map (Table A-1). The Modbus message format follows that shown in section 3.7 of the document cited. The Start Address will be 0004, and the Byte Count of the number of bytes in the text message. (# of characters/2) As [a minimum of] 2 Modbus registers are needed to pass an address [range] to [by] function 16, the Number of Addresses has to be back calculated from the required Byte Count to give the lowest integer such that (Number of Addresses) / 2 = Byte Count. For example if Byte Count = 4, then Number of Addresses = 2 But if Byte Count = 5, Number of Addresses = 3. 14
Trendview Manual: write message via Modbus Input Text message, con t. As an example, to send the 5-character message Start to a slave address 02 the complete [10(hex) function code] message would be: The response follows the normal response for function code 16 given in section 3.7, and so to the above message the response would be: 02 10 00 04 00 03 CRC CRC 15