LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing to digital I/O under traditional Daq enviroment

Hi guys,
 
I could need some help on how to write a simple program to send a discrete signal to control the PLC (on/off) via the SCXI 1161 card under traditional daq enviroment. I would be very grateful if anybody could kindly help me out. Just to provide a little info on my setup, I am using a PCI 6052E connect to one SCXI 1001 chassis and my SCXI 1161 is at the 5th slot.
 
Thank you in advance for any advises provided.
0 Kudos
Message 1 of 4
(2,681 Views)
Phooi,
 
To start with, the SCXI-1161 is a switch module containing 8 relay switches.  Actuallly, the NI-Switch help is actually really helpful in giving you possible switch topologies to use.  For your case, I'm assuming that you'll want to use each of the com chanels of the switch as outputs to your PLC.  If these were digital outputs, you would have a 5V signal connected to the NO (normally opened) pin of each switch, and a GND tied to each NC pin of the 8 relays.  By doing this, you could switch each of the 8 com channels from 5V to 0V simply by switching each relay from NO to NC.  Note that the switching is probably easiest with the NI-Switch driver.  Since it sounds like you are familar with traditional daq, using the swtich driver might be the biggest unknown.  However, it is extremely simple to use and you will use the VI called niSWITCH Connect Terminals to make these channel connections.
 
As far as the multifunction DAQ board is concerned, you could use it either to drive an analog or a digital output (using traditional DAQ).  This would depend on the voltage levels that you are sending to your PLC.  Let me know if this is helpful to you, or of you still have further questions.  My goal was to give a broad overview of what it is commonly done.  If you do have more specific questions as well, I'd be happy to aswer them!
 
Regards,
David Hall | Applications Engineering | National Instruments
0 Kudos
Message 2 of 4
(2,659 Views)
Dave, thanks for responding to my question. You are absolutely correct in describing the way I tried to use the SCXI 1161. I am using the output of the SCXI 1161 to toggle the PLC's relay so as to directly or indirectly manipulate power supply to a motor. My objective is to setup a simple protective program to shutdown the motor once the rpm reached a certain preset limit. However, you were wrong about me knowing traditional Daq. In fact, I am more familiar with DAQmx rather than traditional daq. In DAQmx, I could write a binary code to the SCXI 1161 channel via the digital I/O of the daq card. In traditional daq, I do not know how. Hence,  I will appreciate it if you could show me how. Thanks a lot. 
0 Kudos
Message 3 of 4
(2,651 Views)

Phooi,

To control what relays are opened and closed, you will actually either need to use NI-DAQmx or NI-SWITCH.  Even though many switches are recognized by the traditional DAQ driver, they cannot actually be controlled by it.  In other words, there are no functions in traditional DAQ that can actually open and close SCXI switches.  Before, when you controlled the switch through the digital I/O, were you using SCC relays?  If so, it would make sense to control a relay by writing to the digital out lines.  With SCXI switches, opening and closing relays must be done by making some sort of "connect" call, either with DAQmx or NI-Switch functions.  I would look through some of the NI-Switch examples to get an idea of what switch functions must be used.

Regards,
David Hall | Applications Engineering | National Instruments
0 Kudos
Message 4 of 4
(2,635 Views)