Specifications

Section 15. Alternate Telecoms Resource Library
15-2
'Main Program
BeginProg
'DNP communication over the RS-232 port at 115.2kbps. Datalogger DNP address is 1
DNP(COMRS-232,115200,1)
'DNPVariable (array,swath,object,variation,class,flag,eventExpression,numberofEvents)
DNPVariable (IArray,4,30,2,0,&B00000000,0,0)
DNPVariable (IArray,4,32,2,3,&B00000000,0,10)
DNPVariable (BArray,1,1,1,0,&B00000000,0,0)
DNPVariable (Barray,1,2,1,1,&B00000000,0,1)
Scan(1,Sec,1,0)
'Wind Speed & Direction Sensor measurements WS_ms and WindDir:
PulseCount(WindSpd,1,1,1,3000,2,0)
IArray(1) = WindSpd * 100
BrHalf(WindDir,1,mV2500,3,1,1,2500,True,0,_60Hz,355,0)
If WindDir>=360 Then WindDir=0
IArray(2) = WindDir * 100
'Default Datalogger Battery Voltage measurement Batt_Volt:
Battery(Batt_Volt)
IArray(3) = Batt_Volt * 100
'Wiring Panel Temperature measurement PTemp_C:
PanelTemp(PTemp_C,_60Hz)
IArray(1) =PTemp_C
PortGet (Barray(1),5)
'Update DNP arrays and send unsolicited requests to DNP Master address 3
DNPUpdate(3)
NextScan
EndProg
15.2 Modbus
15.2.1 Overview
Modbus is a communication protocol that allows instrumentation and sensors
to exchange information and data. Modbus enables RTUs (Remote Terminal
Units) to send and receive data from other RTUs, computers, and Modbus
sensors. Modbus has become a widely used standard in most SCADA (HMI)
software, RTUs, PLCs, and some sensors. CR1000 dataloggers communicate
via Modbus over RS-232, RS485 and TCP.
Typical Modbus SCADA systems consist of a PC based SCADA master, RTU
and PLC slaves, field instruments or sensors, and the communications network
hardware. The communications port, baud rate, data bits, stop bits, and parity
are set in the Modbus driver of the master and / or the slaves. Modbus has two
communications modes, RTU and ASCII. Campbell Scientific dataloggers
communicate in RTU mode exclusively.
Modbus sensors can be queried by the CR1000. Because Modbus has a set
command structure, it is easier to get data from Modbus sensors than from