Campbell Scientific AVW200 AVW200-series Vibrating Wire Interfaces - Page 56
AVW200( ) Instruction Running in the Pipeline Mode, TABLE 7-3., Wiring for Example 7.3
View all Campbell Scientific AVW200 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 56 highlights
AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules 7.3 AVW200( ) Instruction Running in the Pipeline Mode The following program is an example of how to run the AVW200 with a CR1000 using multiple AVW200( ) instructions in the pipeline mode of operation. When this CRBasic program first starts running, the information specified in the AVW200( ) instruction is sent to the attached AVW200 interface module via the Com1 communication port and PakBus address 200. Along with the instruction's parameter information, the CR1000 also sends its clock information. Every 64 seconds, the CR1000 clock and measured data are exchanged with the attached AVW200 interface module. The AVW200 interface module then determines how much time previous to the CR1000's interval it should start making the vibrating wire measurement, so that it completes the measurement series before the CR1000's execution interval. In the example program below, a multiplexer is attached to each AVW200 channel. Using the multiplexers, sixteen sensors are measured on channel 1 and sixteen sensors are measured on channel 2. Both of the multiplexers will share the same clock (CLK) and reset (RST) lines on the AVW200. In this example program, a returned "Result" value (the first parameter in the AVW200( ) instruction) of zero indicates successful communication and tells us that the data values have been stored in the destination variable, in this case, AVWDst(). If there is a failure in communication, the "Result" value increments for each failure and the AVWDst() values are filled with NAN's. The datalogger will retry communications three times before returning a failed communication or incrementing the result (retries are every 3 seconds or greater depending on the radio-power-cycle configuration). A negative value returned for the "Result" variable indicates status information (e.g., a -3 indicates the AVW200 has not made the first measurement; -4 indicates that no parameter information is available). Note that the "Result" variable in both AVW200( ) instructions are the same. There is no reason to have different "Result" variables for a given communication port in the pipeline mode. NOTE In the Pipeline mode of operation the AVW200( ) instruction cannot be in a conditional statement or in a subroutine. It is recommended to place the instruction at the top of the program. TABLE 7-3 shows wiring used for this example. TABLE 7-3. Wiring for Example 7.3 Datalogger Port for Cable Attachment COM1 (control port pairs C1/C2) Cable Needed to connect to AVW200 17855 Cable (pigtail to DB9 male cable) AVW200 Port or Model RS-232 48