10-26-2011 05:58 PM
I was trying to modify a LabView VI that is currently used to control 3 Pressure Transducers and 2 Solenoid Valves. Eventually it will also incorporate a control for an ignition system. The current VI utilizes a NI Switch connector to control the solenoid valves using a simple text program. The Solenoid valves are supposed to be in the normally closed position when not electrically excited. So the text file that governs the switch opens the solenoid valves upon initiating the program and closes the valves at the end of the program. Unfortunately for some reason the valves are not closing and I've been able to rule out mechanical and electrical malfunctions of the valve through independent testing. I think it might be a problem with the VI because even the little emergency stop widget that I put in the program was not working to stop the valve program and close it. I would really appreciate some pointers as to what could be wrong with my VI.
Thanks in advanced for your help!
10-27-2011 10:37 AM
Hi Lab Student 69, I am a little confused on how you are controlling your NI Switch to control the solenoid valves. Currently it looks like your VI reads from the pressure transducers, calculates some values based on the voltages you read, then writes some of the data to a measurement file.
At the same time you have a DAQmx task running in parallel to output Boolean data on a device you have. The data seems to be based on a data file that you read in.
Do you want the measurements to take place and then write your data? If so, you should include some structure to force the two loops to not run in parallel. For example you can wire the error out wire from the write to measurement file to the error input of the create channel of the DAQmx task.
Is the purpose of the DAQmx task to control the NI-Switch module? If so, which module are you using? You can control NI-Switches much more easily using the NI-Switch API. There are some great examples included with the NI-Switch driver that show a lot of the functionality of the API.
I hope this information is helpful!
10-27-2011 04:55 PM
The NI Switch is indeed using a binary data file that has a series of columns that correspond to the particular Switch terminal that I'm operating (i.e. 1 to activate that terminal 0 to deactivate that terminal). In case that wasn't a clear description, I'll attach the binary file. The switch is included in the VI diagram as a widget labeled O/F. I do want to take measurement data from the pressure transducers in addition to controlling the solenoid valves. What's going on with the pressure trasducers is that they are calibrated to measure pressures for a specific gas. If you use a different gas with these pressure transducers, you must do some conversions (provided by the manufacturer) to get the proper readout. In addition to this, the main readout of these pressure transducers is in voltage, so a conversion must be done anyway to get the pressure readout.
I want to be able to collect and read off the front pannel, real-time pressure measurements from the pressure transducers. If I can write the output data to a file while simultaneously reading the info from the dashboard then yes, that would be great to write the data as the measurements take place. From some of the output files I already produced, it seems as though that's what's going on because I've been writing the files to locations on the desktop and I can see them popup as the tests progress. The purpose of the DAQmx is to simultaneously control the NI-Switch and the writing of the pressure transducer measurements (while performing the aforementioned conversions). I am currently using the NI USB 6525 switch, and NI 6229 DAQ Card and a DAQ SCB-68 Screw terminal.
At any rate, I added the wiring from the error out wire to the error input of the write measurement to file like you suggested and it seems like the valves are closing now. So thanks, that's great. But I would also like to add a widget to the VI that will add a button to the front pannel that will allow me to shut off the solenoid valves with a single click of the mouse should an emergency abort be required. Would you have any suggestions?
Thanks again for all of your help!
11-01-2011 03:19 PM
Hello there,
Looking at your VI I would start with a couple changes to the Stop button. First connect the button straight to the Stop sign that way you can stop the loop and have direct control. I would also create a local variable out of it to control the For loop and turn that one off as well.
I was wondering if you could explain in greater detail exactly what is not working here. any additional detail will help and I will try to find a solution for you.
Dano
01-15-2012 07:55 AM
Automotive Pressure Transducers
SS204 Series Automotive Pressure Transducers are designed for oil pressure monitoring,braking system and A/C system.
01-15-2012 07:59 AM