08-10-2015 05:08 PM
Hello,
I am working on a prototype composite manufacturing project wherein I am trying to connect four 24 VDC solenoid valves to a NI digital module 9472 with a USB DAQ Chassis 9171. The solenoids will be used to control several pneumatic air pistons. I have so far used NI Max and an NI example code "Digital - SW-Timed Output" to turn one valve on.
Now I am looking for some help to build a VI accomplish following things:
1. How do modify the existing VI to make it turn off the solenoid too. As the way I have it now is when I execude the code, the solenoid is continously on.
2. If I connect 4 such solenoids, and want to turn them on in a pattern such as "TFFF,FTFF,FFTF,FFFT"?
3. I would want to put a delay time between the 4 operations say 30 s, as a user input in the front panel.
4. I want this whole operation to repeart "n" times, as another user input.
5. Last thing, any changes I make to the VI, and save it form File -> Save/Save as, it reverts back to the original version. I am working from the default NI system folder where all the examples for "Digital Output" are saved. Also whenever I try to copy it to another location, it wont run as it keeps on searching for the other accessory VIs. I have tried to save it as a project, but even that doesnot help.
I have enclosed screen grabs of the VI which works for one solenoid, and the original VI (it wont let me save the modified VI properly).
I am very new to coding with NI, so any help/guidance will be greatly appreciated. Thanks.
Vikram
08-11-2015 09:51 AM
Hi vdey
I hope you are doing great. Regarding your questions about the digital outputs generation, I did my research using the same example of Digital -SW Ouput VI.
I did not change anything of the code except for some few changes.
Ok, first question
Using this VI example I am able to control the outputs and when I used one of the booleans controls I am able to turn on and off the different outputs of the modules.
Second question
If you want to create an automatic pattern with the outputs of the module, I think you can use a array with Booleans premade it by you combined with a state machine.
Third question.
Again, with a state machine you can use a delay function and instead of using a constant for the input you can create a control for it.
Fourth Question
Maybe you can try with a Foor loop with a control attached to the N terminal to control the times you want to do this action.
Fifth Question
Try to copy the folder where are located these examples and save this new folder in a new location and try to work over this new copy.
I am attaching somes links that could be useful to you;
Sintax of multiple channels
http://digital.ni.com/public.nsf/allkb/9A2AF5E10E0C893386256FE8006807DF?OpenDocument
Tutorial States Machines
http://www.ni.com/tutorial/7595/en/
Warm Regards.
08-11-2015 02:02 PM
Hi Rairiki,
Thank you very much for your quick response. I really appreciate your directions. I am really new to Labview, and if it is not improper to ask can you share with me the VI version you modified? I can understand if you have reservations, otherwise I will brainstorm and try to figure it out, and will ask you specific questions which I may have. Thanks again.
Vikram