vhha1972 Posted August 22, 2012 Report Posted August 22, 2012 Hi All, I am stuck with a problem. I have a task whereby I am supplying 6V to a pressure sensor. This is supplied inside a while loop using a constant value of 6 -- "one sample on demand." At the same time I have to supply pulse width modulated (PWM) voltage to a pressure release valve. This valve is CLOSES (ON) on 4V and OPENS (OFF) at 0V. I kind of want to flap this valve (OPEN-CLOSE) at a certain rate to achieve a specified leakage in the the system. I used another channel of my DAQ Book and gave it simulated square wave. However, this requires the DAQ to be set at "continuous samples." So, there is a conflict. I tried to supply my 6V to the pressure using "continuous samples" but it failed. Also, I tried to configure the DAQ for simulated signal as "one sample on demand." Again it failed! Please see the VI attached. Is there a simple and consistent way to send the desired voltages to both devices? Thanks a lot! Saif Ex_9.vi Quote
Tim_S Posted August 23, 2012 Report Posted August 23, 2012 I'm not able to look at your code right now, but I'm confused as to why you are trying to supply power to these devices using a DAQ card. I would be surprised if the card can source enough current to operate the sensor or valve. A better way would be using a 6V power supply for both sensor and valve (assuming the valve can take 6V) and switch the signal to the valve using a digital output going to a SSR. Quote
Ton Plomp Posted August 23, 2012 Report Posted August 23, 2012 My first advice is to stop using the DAQ express VIs for this task. Create a task in MAX that has two channels and an output rate of 500 Hz. (that's how your square wave is set up. Then use the following code. (I have altered your square wave generation to output 500 samples per iteration). Please try to understand the VI I uploaded. Ton Quote
vhha1972 Posted August 24, 2012 Author Report Posted August 24, 2012 Hi Tim, I am doing exactly what you mentioned. I am indeed using 6V and relays. Hi Ton, thanks so much for the code. I will try it out and let you know. Ton, would it be possible to please upload .VI file? Thanks to both of you! Saif Quote
Ton Plomp Posted August 24, 2012 Report Posted August 24, 2012 The picture I posted is a snippet, click on it, and from the new browser window, drag and drop it into your LabVIEW block diagram. Ton Quote
asbo Posted August 24, 2012 Report Posted August 24, 2012 The picture I posted is a snippet, click on it, and from the new browser window, drag and drop it into your LabVIEW block diagram. What setup are you using that this actually works? Win7 x64/Chrome 21 just drops the URL and both IE9 & Firefox don't do anything Quote
Ton Plomp Posted August 24, 2012 Report Posted August 24, 2012 I was quite surprised that Opera 12, WinXP and LV 2011 work! Quote
ShaunR Posted August 24, 2012 Report Posted August 24, 2012 What setup are you using that this actually works? Win7 x64/Chrome 21 just drops the URL and both IE9 & Firefox don't do anything Yeah. snippits are a bit of a pain (better to post the code). In other browsers (like firefox) you have to open the image in a new tab/window, save/drag it to the desktop, then drag it to the VI. Quote
asbo Posted August 24, 2012 Report Posted August 24, 2012 Yeah. snippits are a bit of a pain (better to post the code). In other browsers (like firefox) you have to open the image in a new tab/window, save/drag it to the desktop, then drag it to the VI. Yep. They're handy for easy viewing but not for actual use. I wonder if the problem is with LabVIEW not handling the drag/drog correctly or the browser not publishing it properly? I'm leaning toward the latter, since apparently Opera works. Unless it's an OS thing, of course. Anyway... /sidebar. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.