LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop/Start DAQ-mx acquisition with boolean

Solved!
Go to solution

Hi Folks,

Newbie with a question here.

 

I have written an application to drive a simple actuator.

The actuator goes in and out as expected but I now need to measure the current needed to drive the unit.

As the actuator isn’t in constant operation I just want to acquire data when it’s being driven.

I’m using DAQ-MX but I’m struggling to stop and start the acquisition. The control program can generate a Boolean to start and stop things which seems logical but I need some advice on how to proceed.

P.S. Actuator travel time isn’t constant but it’s between 4 – 12 seconds  

 

Thanks for you time

 

 

0 Kudos
Message 1 of 37
(2,679 Views)

There is a start/pause logging feature, but without knowing what is in your VI it is hard to advise.

 

You could also trigger an acquisition when the actuator starts and stop it when it stops.

 

mcduff

Message 2 of 37
(2,670 Views)

Hi mcduff,

Thanks for reply,

The vi is quite simple (unfortunately I don't have it with me)

The producer loop drives the actuator,  which triggers the end stop switch. this starts a count down timer. when the timer = zero the actuator goes in the other direction. So I was planning on using this timer to  trigger the acquisition in the consumer loop via a que. Then process the data to give a max and min and write to disk in another loop. 

I will try and write a quick snippet if that helps.

 

0 Kudos
Message 3 of 37
(2,661 Views)

As the Cromulons say "Show me what you got" (A Rick and Morty Reference).

 

An idea:

Does the end stop switch trigger a digital line? Is your DAQ monitoring that digital line?

 

You could make a DAQmx event that watches the Digital line change states, when this happens it triggers a start/stop acquisition sequence. Sorry I cannot offer more, flying blind here.

 

mcduff

Message 4 of 37
(2,655 Views)

Hi mcduff,

 

Yes the end stop does trigger a digital line (one each end) but I need to wait for 30 sec before actuating in the other direction.

0 Kudos
Message 5 of 37
(2,653 Views)

If you have digital line you should be able to use those to generate events or for triggering purposes.

 

The only people on the forum that can fix your VI without seeing it are Kevin Price and Jeff Bohrer. Sorry I cannot help more without seeing your VI.

 

mcduff

Message 6 of 37
(2,651 Views)

I can post my vi on Monday eve if  you think that's the best option.

Thanks 

0 Kudos
Message 7 of 37
(2,648 Views)

That seems like a good idea.

 

Cheers,

mcduff

Message 8 of 37
(2,643 Views)

Hi mcduff,

 

I've replicated my vi,  if I can ask you to have a look?

 

Many Thanks 

0 Kudos
Message 9 of 37
(2,617 Views)

Same VI's saved as Labview V16

0 Kudos
Message 10 of 37
(2,615 Views)