Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a "true-false" result to a digital output

I'm using a  system consisted of PCI-6502E board/Chassis SCXI-1001/Module SCXI-1102 to measure temperature using thermocouple. Now I need to control the temperature by comparing it to upper and lower limits of a range and turning on/off a light and a fan. I have attached my measurement file for reference. In this file I was able to do the comparison and produce "true-false" results for over-limit and under-limit values of temperature. Now I need to -somehow- convert these results to the digital signals to turn on/off two electrical relays (for light / fan system). I have an output board(PCI-6713) connected to a SCB-68 connector block. But I don't know how to connect my software to the output hardware. I have gone through the examples but no luck, and my time to finish this job is limited. Can anybody give me some hints on this issue?
Again the file is attached.
Thanks
 
0 Kudos
Message 1 of 5
(3,550 Views)
Mehran,
This can be done in a fairly straightforward way.  I have attached a modification of one of the examples that ships with LabVIEW (MODIFIED Write Digital Channel).  Basically this performs a DAQmx Digital write to two lines of a digital port -- these can be selected via the control or changed to a constant if you want.  This program currently writes a TRUE to Port 0 line 0 if the input data is greater than the upper limit and it writes a TRUE to Port 0 line 1 if the input data is below the lower limit.
From here, just add the example to your code and wire in your thermocouple measurement as the input data and this should work beautifully.
Let me know how it works out for you.
Erik F
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,525 Views)

Mehran,

I just realized you were using Traditional DAQ in your application, and my example was DAQmx -- I apologize for that oversight!  Here is an example in Traditional DAQ, it functions just the same -- when you exceed upper limit channel 0 is set to TRUE, and when you drop below lower limit channel 1 is set to TRUE.  Again, just connect your t-couple data to the input data wire and this should do what you need.

Thanks!

Erik F

0 Kudos
Message 3 of 5
(3,518 Views)
Erik,
It worked very well. Thanks a lot.
Mehran
0 Kudos
Message 4 of 5
(3,501 Views)

Glad to hear it, we're here to help!

Erik

0 Kudos
Message 5 of 5
(3,495 Views)