Some
Pointers for Implementing Control Systems in LabVIEW with GPIB/IEEE-488
When you implement a control system in LabVIEW there are some items you
should consider in the implementation.
-
Your control system will
operate with a loop. In the loop you will actually perform control
actions that must be done repeatedly. However, some items are best
moved outside the loop.
-
You need to reset instruments.
In the most basic control system you will have a measurement instrument
(Data Acquisition Unit or DVM) and something like a power supply to drive
the actuator.
-
Reset both instruments
outside of the loop.
-
You may need to activate
the output(s) of the power supply.
-
Activate the power supply
outside the loop.
-
In some situations you
might have to provide power to a sensor or circuit in which the sensor
is embedded.
-
Turn on the power supply
(activate it) for sensor circuitry outside the loop.
-
If these are all GPIB/IEEE-488
instruments, in LabVIEW an error signal is developed. For those actions
taken outside the loop run the error signal from the first GPIBWrite function
to other functions in an unbroken progression. Do not run the error
signal into the loop, and then try to bring it back out.
-
Inside the loop, try to
observe the following.
-
If you have a single unbroken
string of error messages, then you can control the sequence in which things
happen. Within the loop, a good sequence is the following:
(And a careful observer will note that the sequence here is the sequence
in which things seem to take place within the control loop on the block
diagram of the control system.
-
Take the measurement.
In other words, string together all of the operations needed to take the
measurement. You should wire the error signal from outside the loop
to the first GPIBWrite in this sequence. In other words, the error
signal will be wired from outside the loop to a GPIBWrite inside the loop.
Once inside, you should not try to bring it back to a GPIB block outside
the loop.
-
Compute the control effort.
-
Generate the control effort
using the power supply. Use whatever GPIB blocks are necessary to
produce the voltage you need. Wire the last error from the measurement
string to the first GPIB block in this set and wire them in sequence.
-
Finally, add whatever
else is necessary, including opening a file, writing data to a file and
closing the file. Remember that there is another error string for
those operations, and you should not wire the error string from
the GPIB blocks to the file operations blocks.