National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference DIG_In_Grp
©
National Instruments Corporation 2-171 NI-DAQ FRM for PC Compatibles
DIG_In_Grp
Format
status g DIG_In_Grp (deviceNumber, group, groupPattern)
Purpose
Reads digital input data from the specified digital group.
Parameters
Input
Output
Parameter Discussion
group is the group to be read from.
Range: 1 or 2.
groupPattern returns the digital data read from the ports in the specified group.
groupPattern is mapped to the digital input ports making up the group in the following way:
If the group contains one port, NI-DAQ returns the eight bits read from that port in the
low-order eight bits of groupPattern.
If the group contains two ports, NI-DAQ returns the 16 bits read from those ports in the
following way: if the group contains ports 0 and 1, NI-DAQ returns the value read from
port 0 in the low-order eight bits, and NI-DAQ returns the value read from port 1 in the
high-order eight bits. If the group contains ports 2 and 3, NI-DAQ returns the value read
from port 2 in the low-order eight bits, and NI-DAQ returns the value read from port 3 in
the high-order eight bits. NI-DAQ reads from the two ports simultaneously.
If the group contains four ports, NI-DAQ returns a deviceSupportError. Use
DIG_Block_In to read a group containing four ports.
Note
C Programmers—groupPattern is a pass-by-reference parameter.
Name Type Description
deviceNumber i16 assigned by configuration utility
group i16 group
Name Type Description
groupPattern i16 digital data read from the ports