11-02-2018 12:37 PM
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
Solved! Go to Solution.
11-02-2018 01:09 PM
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
11-02-2018 01:24 PM
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.
11-02-2018 01:52 PM
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
11-02-2018 02:00 PM
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.
11-02-2018 02:09 PM
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
11-02-2018 02:23 PM
I can post my vi on Monday eve if you think that's the best option.
Thanks
11-02-2018 02:41 PM
That seems like a good idea.
Cheers,
mcduff
11-03-2018 04:43 AM
Hi mcduff,
I've replicated my vi, if I can ask you to have a look?
Many Thanks
11-03-2018 04:48 AM
Same VI's saved as Labview V16