Download NI-845x Software User Manual

Transcript
Chapter 5
NI-845x I2C API for LabVIEW
Outputs
i2c script reference out is a reference to the I2C script after this VI runs.
error out describes error conditions. If the error in cluster indicated an
error, the error out cluster contains the same information. Otherwise,
error out describes the error status of this VI.
status is TRUE if an error occurred.
code is the error code number identifying an error. A value of 0
means success. A negative value means error: VI did not execute
the intended operation. A positive value means warning: VI
executed intended operation, but an informational warning is
returned. For a description of the code, wire the error cluster to a
LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.
Description
Use NI-845x I2C Script DIO Configure Port.vi to add an I2C Script DIO Configure Port
command to an I2C script referenced by i2c script reference in. This command allows
you to configure all eight lines of a byte-wide DIO port. Setting a bit to 1 configures the
corresponding DIO port line for output. Setting a bit to 0 configures the corresponding port
line for input. For NI 845x devices with multiple DIO ports, use the port number input to
select the port to configure. For NI 845x devices with one DIO port, port number must be
left at the default (0).
© National Instruments Corporation
5-31
NI-845x Software User Manual