Section 8. Operation
Public
IArray(4)
As Long
Public
BArray(2)
As Boolean
Public
WindSpd
Public
WindDir
Public
Batt_Volt
Public
PTemp_C
Units
WindSpd=meter/Sec
Units
WindDir=Degrees
Units
Batt_Volt=Volts
Units
PTemp_C=Deg C
'Main Program
BeginProg
'DNP communication over IP at 115.2kbps. CR1000 DNP address is 1.
DNP
(20000,115200,1)
'DNPVariable(Source,Swath,DNPObject,DNPVariation,DNPClass,DNPFlag,DNPEvent,DNPNumEvents)
DNPVariable
(IArray,4,30,2,0,&B00000000,0,0)
'Object group 30, variation 2 is used to return analog data when the CR1000
'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,1,1,3000,2,0)
IArray(1) = WindSpd * 100
BrHalf
(WindDir,1,mV2500,1,Vx1,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
(2,3)
NextScan
EndProg
8.6.2 Modbus — Details
Related Topics:
•
Modbus — Overview
(p. 91)
•
Modbus — Details
(p. 411)
411
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......