PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control a solenoid via PXI-2520 and DaqMx Switch

I am a LabView novice with Core 1 and Core 2 training so I am familiar with the fundamentals of LV process flow however, this is the first application I am attempting to develop that is not a simulated training VI. That said, I am having trouble ironing out the necessary logic to control a 10 solenoid 2 position valve manifold. I have developed a VI that will contact and disconnect a particular relay in the style of the "Switch Controlling Individual Relay.VI" on my PXI-2520 module but these are single instance events. Ie. i set the device, name the relay, and tell the VI which action (make or break) and run the VI. What I am trying to develop is a continuously running VI where any one or multiple solenoids can be energized/de-energized using simple boolean control whereby each relay is represented by a switch on the front panel.

 

It is clear that a while loop is necessary and a series of case structures or State Machine architecture is necessary but all my attempts have been fruitless. the common failure mode tends to be when following iterations of the while loop tell a switch that is already open to reopen or vise versa thereby causing an error. My thought here ist that some feedback from a former  iteration is necessary so that only "unequal" boolean values for the former iteration calls a case to connect/disconnect. What are your thoughts?

 

Eventually this VI will also need to control these solenoids automatically (i think DaqMx Create scan list with software triggers will suffice) but each action willl need to be timed. For now though it is most critical that I have the capability of operating the solenoids manually and dynamically.

 

Thankyou,

 

DK01

0 Kudos
Message 1 of 2
(5,354 Views)

Welcome to the forums! 

 

If you can, please post a snippet of code from what you've attempted so far. We can take a look at it and make some recommendations. 

 

One of the lessons in Core 1 also talked about the use of the event structure. It may be a good use case for an event driven state machine that can modify the states of specific switches. 

Nathan Murphy
NI C Series Modules Product Manager with an expired CLA
0 Kudos
Message 2 of 2
(5,334 Views)