National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference SCXI_Set_State
NI-DAQ FRM for PC Compatibles 2-362
©
National Instruments Corporation
SCXI_Set_State
Format
status = SCXI_Set_State (SCXIChassisID, module, port, channel, data)
Purpose
Sets the state of a single channel or an entire port on a digital output or relay module.
Parameters
Input
Parameter Discussion
port is the port number of the module to be written to. Currently, all of the SCXI modules
support only port 0.
channel is the channel number on the specified port. Because all of the modules support only
Port 0, channel maps to the actual channel on the module. If channel = –1, the function writes
the pattern in data to the entire port.
n: Write to a single channel.
SCXI-1160: 0 <
n < 16.
SCXI-1161: 0 <
n < 8.
SCXI-1163: 0 <
n < 32.
SCXI-1163R: 0 <
n < 32.
–1: Write to an entire port.
When channel = –1, data contains the pattern of an entire port. Bit 0 corresponds to the state
of channel 0 in the port, and the states of the other channels are represented in ascending order
in data so that bit n corresponds to channel n. If the port is less than 32 bits wide, the unused
bits in data are ignored.
Name Type Description
SCXIChassisID i16 chassis ID number
module i16 module slot number
port i16 port of the module to write to (all current modules
support only port 0)
channel i16 the channel on the specified port to change
data u32 contains new state information for a single
channel or a digital pattern for an entire port