Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Get Relay Position

Hardware: Switches

Problem:
How can I obtain position for a relay of a switch module?

Solution:
In LabVIEW, you can obtain the relay position using niSwitch Get Relay Position.vi from the NI-SWITCH API or DAQmx Switch Get Relay Position.vi from the NI-DAQmx API.

You would have to call this VI repeatedly to scan through all the relays. To return all relay positions with one call, you can use DAQmx Switch Get Relay Position.vi from the NI-DAQmx API.

Documentation for both VIs can be found in the LabVIEW Help once NI-DAQ and NI-SWITCH are installed. C programming reference help can be found using the attached NI-DAQmx C Reference Help and the NI Switches Help, linked below. The corresponding functions to the VIs listed above are as follows:

NI-SWITCH
ViStatus niSwitch_GetRelayPosition (ViSession vi, ViConstString relayName, ViInt32* relayPosition);

NI DAQmx
int32 DAQmxSwitchGetMultiRelayPos (const char relayList[], uInt32 relayPos[], uInt32 relayPosArraySize, uInt32 *numRelayPosRead);

Related Links:
Product Manuals: NI-DAQmx Help
Product Manuals: NI Switches Help

Attachments:


cdaqmx.chm


Report Date: 03/14/2005
Last Updated: 03/14/2005
Document ID: 3JD7PDLE

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit