Campbell Scientific CR6 CR6 Measurement and Control System - Page 413
Modbus - Details
![]() |
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 413 highlights
Section 8. Operation 'Object group 30, variation 2 is used to return analog data when the CR6 'is polled. Flag is set to an empty 8 bit number(all zeros), DNPEvent is a 'reserved parameter and is currently always set to zero. Number of events is 'only used for event data. DNPVariable(IArray,4,32,2,3,&B00000000,0,10) DNPVariable(BArray,2,1,1,0,&B00000000,0,0) DNPVariable(BArray,2,2,1,1,&B00000000,0,1) Scan(1,Sec,1,0) 'Wind Speed & Direction Sensor measurements WS_ms and WindDir: PulseCount(WindSpd,1,U9,1,3000,2,0) IArray(1) = WindSpd * 100 BrHalf(WindDir,1,mV5000,U1,U11,1,2500,True,0,60,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(2,3) NextScan EndProg 8.6.3 Modbus - Details Reading List: • Modbus - Overview (p. 86) • Modbus - Details (p. 413) The CR6 supports Modbus master and Modbus slave communications for inclusion in Modbus SCADA networks. Modbus is a widely used SCADA communication protocol that facilitates exchange of information and data between computers / HMI software, instruments (RTUs) and Modbus-compatible sensors. The CR6 communicates with Modbus over RS-232, RS-485, and TCP. Modbus systems consist of a master (PC), RTU / PLC slaves, field instruments (sensors), and the communication-network hardware. The communication port, baud rate, data bits, stop bits, and parity are set in the Modbus driver of the master and / or the slaves. The Modbus standard has two communication modes, RTU and ASCII. However, CR6s communicate in RTU mode exclusively. Field instruments can be queried by the CR6. Because Modbus has a set command structure, programming the CR6 to get data from field instruments is much simpler than from serial sensors. Because Modbus uses a common bus and addresses each node, field instruments are effectively multiplexed to a CR6 without additional hardware. A CR6 goes into sleep mode after 40 seconds of communication inactivity. Once asleep, two packets are required before the CR6 will respond. The first packet awakens the CR6; the second packet is received as data. CR6s, through 413
![](/manual_guide/products/campbell-scientific-cr6-cr6-measurement-control-a476969/413.png)