Peter, Jon and I are building a Programmable Electronic Load. In this series of blogs I'm building a LabVIEW library of reusable components
In this seventh article I introduce the first advanced block: Raw ADC control. |
LabVIEW has a set of blocks to build flows with serial communication devices. Those blocks work well with our instrument.
However, inspired by what many instruments do (in this case, the BK Precision 85xx series), I'm creating more abstract blocks.
This block is in the Advanced section of the driver library. If you use this block, you're supposed to know what you are doing. |
Raw ADC Block
This blog gets the load's ADC values directly.
For the Raw ADC block, the input parameters are
- VISA resource name eload
- ADC #: the channel you want to set (1 - 4)
- error in (no error)
The output parameters are
- VISA resource name out
- ADC OUT: the value get (0 - 65535).
This gets the value representing the last ADC sample.
- error out
After running this block, the following functionality is performed:
- The selected ADC channel returns its value. This is a low level operation for advanced users.
The common way to set the instrument is to use the objects in the Configure tree branch. - If an error is detected, the VISA resource is closed and error info is passed to the caller.
Else the block passes the sampled value to the calling flow via the ADC OUT parameter.