PVS5120-Series Portable Samplers
43
8.2.4.5 PakBus® Example Instructions
Below shows example
CRBasic
instructions for using PakBus® to control the
sampler.
This instruction initiates a sample:
SendVariables(
Result(2),ComSDC7,0,sampler_PakBus_address,0000,0,
"Public","Start",Start_sample,1
)
This instruction collects the status values:
GetVariables(
Result(3),ComSDC7,0,sampler_PakBus_address,0000,0,
"Public","Bottle",Sampler_status(1),4
)
8.2.5 Modbus® Control
Both PakBus® and Modbus® control types use the MD485 to communicate
with a Campbell Scientific datalogger via RS-485. When using RS-485,
connect the sampler to an MD485 using the PVS5120CBL control cable and
connect the MD485 to the datalogger using an SC12 cable. The
CRBasic
program uses the
ModbusMaster()
instruction. The Modbus® address is
assigned in
DevConfig
and referenced in the datalogger program. The
Modbus® address must be unique for each sampler on your network and for
each datalogger.
Four status variables are returned to the datalogger once the sample is complete
and in the case of the discrete sampler the arm moved to the next location. The
program running on the datalogger needs to monitor the sampler for the sample
to complete and then asks for the status values (see Appendix
(p. B-6)
). The response time of the sampler varies depending
on the purge, vacuum, and sample drop times set up in
DevConfig
. The longer
the hose and the greater the lift between the sampler and the water source, the
longer it takes for status values to be returned.
It is also possible to use a third party’s PLC to control the sampler via RS-485.
8.2.5.1 Configuring the MD485
1. Connect a serial cable to the RS-232 port on the MD485 and to the
computer.
2. Supply power (12 Vdc) to the MD485 by the power jack or through the
+12 V line on the CS I/O connector. The SC12 serial cable connects the
MD485’s CS I/O port to the datalogger’s CS I/O port; an SC12 cable is
shipped with the MD485.
3. Open
DevConfig
. Click
Peripheral
. Select
MD485
. Select the
Communication Port
. Push the
Program
button on the MD485. Click
Connect
. The program button is located to the right of the RS-485
connectors on the modem’s front panel (FIGURE
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: ......