LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Solenoid Control with LabVIEW

Solved!
Go to solution

Sounds like you should monitor the RPMs of the wheel then.  Ignore the sensor output until your rotational limit is within your specified range.  This is a bit trickier to implement of course.  Look at some examples of counter VIs.  I haven't looked at the specs of your hardware so this might be easy or you might have to get creative to get this to work.  See what you can come up with and post back...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 11 of 15
(2,462 Views)

I've decided to use a Digital SW-timed output in order to output the signal from the output DAQ to the photoelectric sensor. I want to use a digital SW-timed input to read the incoming signal response from the photoelectric sensor. When the input signal is true I want to send out a seperate digital SW-timed output to the solenoid valve. I have created the digital SW-timed inputs and outputs seperately, but my question is how would I programmatically put them together. Im unsure of the kind of structure to use in order to make the second output fire immediately after reading the incoming input. 

 

Shervin Aslani

 

edit: in summary, i need to find out how to make my Input 9142 DAQ continuosly reading for a signal from the photoelectric sensor. In the same program a user event will send out my output signal from the output 9472 DAQ. Once the 9142 receives the input signal it will tell the 9472 output to send the digital signal to the solenoid valve. I have created the SW-timed output and inputs, I just dont know what to use in order to put these together to satisfy the order of events. Thanks for all the tips and help in advance.

0 Kudos
Message 12 of 15
(2,418 Views)

It's 9421. 

 

Can't really recommend much without seeing your code.  Post it up and we'll take a look at what you're doing....

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 13 of 15
(2,388 Views)

What do I use to put these together? 

 

Shervin Aslani

0 Kudos
Message 14 of 15
(2,372 Views)
Solution
Accepted by topic author shervy

I wouldn't think this would even run without hardware conflict errors.  You usually can't start two tasks with one hardware target like you're doing for your 9472.  You'll need to create just one DO task and select all the ports/lines you want to control.  The reason for this is that most DAQ hardware only has only one clock.

 

As far as putting the DO and DI together... Just do it! Smiley Happy  There's no reason to have them in seperate loops (although you can with more advanced techniques like queues and notifiers).  Put them both in one big loop along with any control logic.  I suggest you start simple.  Try to simply write to a DO line and read it back on a DI line.  Don't forget to wire them together physically.  

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 15 of 15
(2,352 Views)