Appendix C. Monitoring Sampler Status via RS-485
C-6
Response_List(5) = "Sampler vacuum timed out, no sample detected"
Response_List(6) = "Sample overflow detected"
Response_List(7) = "No sample liquid detected"
Response_List(8) = "Arm calibration error"
Response_List(9) = "Conductivity rod and Sample tube are shorted"
sampler_PakBus_address = 95
'Right now this sample program scans every 10 seconds and triggers the sampler once a minute
'zero seconds into the minute. Both the scan interval and the sampler time can be adjusted as needed.
Scan (30,Sec,0,0)
GetVariables (Result,ComSDC7,0,sampler_PakBus_address,0000,0,"Public","Bottle",Sampler_status(1),4)
response_code_message = Response_List(Respo1)
CallTable SamplerStat 'send the current status values to the SamplerStatus table
If Result<> 0 Then
'call the communcation error table.
CallTable Errors
EndIf
NextScanEndProg
C.4.2 Monitoring via Modbus®
When monitoring via Modbus®, you need to issue the
ModbusMaster()
instruction and save the returned values to variable array. These status values
are array values 23 through 29 in TABLE
. Below is the instruction’s
structure and an example instruction. Also a CR1000 program is available.
The
ModbusMaster()
instruction initiates a sample and collects the returned
status values. This instruction accesses the Coils and Input Registers stored in
the VSC100 controller. TABLE
provides the name and description of the
RS-485 coils or registers stored in the VSC100 Public Table.
The settings/options chosen within the instruction depend on whether you are
triggering a sample, checking to see if it is done sampling, or asking for the
status values.
ModbusMaster(
ResultCode, ComPort, BaudRate, ModbusAddr, Function,
Variable, Start, Length, Tries, TimeOut, [ModbusOption]
)
This instruction collects the status values:
ModbusMaster(
MbResult(3),ComSDC7,38400,MBAddress,3,Sampler_status(),
23,4,3,100,0
)
Summary of Contents for PVS5120 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 8: ......
Page 70: ...Appendix A Sample Transport Velocity A 2...
Page 78: ...Appendix B Example Programs B 8...
Page 86: ...Appendix C Monitoring Sampler Status via RS 485 C 8...
Page 96: ...Appendix G Generic Modbus Control G 4...
Page 100: ...Appendix H ISO5667 Conformity H 4...
Page 101: ......