LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help, cycle testing...

Hi all,

   First off i would like to just say i am a complete labview noob!

I am having quite a bit of trouble getting a vi together to run a pressure cycle test.

My workplace has some, what seems old school hardware and software. 

I am trying to create a vi that reads pressure from a pressure transducer which when is greater than a desired pressure it will turn on/off relays on a relay board made by an old co-worker. The relays are what turn on/off a pump.  I assume this would have to be some kind of a loop but like previously stated, i am new to this and i am very stuck, confused, and most of all lost with no solution... here is what i am working with:

Software:

MAX vers. 4.5

LabVIEW 7.1

 

Hardware:

SCXI 1000 Chassis

  1. SCXI 1600
  2. SCXI 1102->1303 (thermocouple readings)
  3. SCXI 1121->1321 (pressure transducer)
  4. SCXI 1160->1324 (switch)

 

Thus far my understanding is that the SCXI 1160 connected with the 1324 is the switch board which then powers my relay board.  I just cannot understand or find out how can i implement this in my vi to turn things on and off. 

I appreciate any help or guidance in the right direction... I can take a picture of the block diagram i currently have if needed which is most likely not helpful

0 Kudos
Message 1 of 6
(2,909 Views)

You seem to know what you want th vi to do.  Go ahead an attach the vi you have so far and we'll peek into it.  Also, what version of NI DAQ are you using?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(2,902 Views)

i am not quite sure where to find what version of NI DAQ i am using, in MAX i sent in software and saw 8.8

and attached is the vi i have, i just dont know where i can tell the vi to turn on/off the pump when the pressure reading from the transducer is above the limit...

0 Kudos
Message 3 of 6
(2,888 Views)

i have done a bit of progress on this...

i have found a way, from an old vi, to turn on the switch, although when i run the vi and it stops(when the pressure is above the limit) it doesnt turn it off... i included a picture of what i have so far...

 highlighted in yellow is what i added, i have figured out that the "start" t/f is what switches on/off, but i need it to switch on when i run the vi (which it does) and switch off when the conditions aren't met...

0 Kudos
Message 4 of 6
(2,873 Views)

bump i still need help

0 Kudos
Message 5 of 6
(2,845 Views)

OK you've got some basic misconceptions about LabVIEW and, more generally, about programming.  So I'll try to explain what your program does and point you to the LabVIEW help and tutorials.

This section of code really make little sense:

untitled1.PNG

In it it read a value from the DAQ and passes it into the loop after the loop starts the value is a loop invariant constant (it does not change) so if Pressure is not greater than High limit the loop spins very fast consuming the entire processor core it runs on until the user changes the value of High limit to make stop = True.

 

This section Writes on T boolean to a DO Task

untitled.PNG

HOWEVER, since there is no data dependancy between these two sections of code LabVIEW is free to spawn a new thread and both will execute at the same time. (LabVIEW is great for making multi-threaded applications - even when you didn't want it to)

 

What you want to do is read the Pressure repetedly at a meaningful rate and write the DO task based on the comparison. Then Exit when the user wants to exit.  A state machine would be a good choice for this vi.  to add scalability to the project but, you could get away with a simple while not exit loop with a DAQmx Read a comparison and a DAQmx write in it with task initialization prior to the loop and clean-up code for the tasks after the loop.   Use the New vi from template to select a state machine pattern and look at the shipping examples to help understand how to use these patterns in your code.

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(2,840 Views)