From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

timing analog generate and aquire steps

Hi all,

 

I need some help setting up some steps in SignalExpress LE 2.5. I'm using the PCI-6225 card for aquisition and generation.

 

We are running a test where we require power to be fed periodly through a set of cables under test.  The power cannot remain on continuously, so a relay (controlled by the PCI-6225 Analog Outs) closes the circuit for 4 seconds every 30 minutes. 

 

What I need from the hardware/software is to take a voltage reading from each of the individual conductors during this 4 second 'on' window.  I have been experimenting with this setup for a couple weeks now, and have come close but not acheived what I was hoping. 

 

The problem I am having is getting the data aquire step to syncronize properly with the voltage generation (relay control) step.  I want to take 1 sample (on demand) every 30 minutes to coincide with the high time of the voltage i'm generating, and there seems to be a large drift going on between the two steps.

 

If i shorten the cycle to 30 seconds I can get a good sample within the 4 second window about 8 times or so, but after that the aquisition drifts too far out of time with the relay.

 

Is what i'm trying to do possible given the tools I have?  I have currently fallen back to taking a sample every 3 seconds to guarantee that I get 1 good sample during the 'on' window, but unfortunately that creates a ratio of 1 good sample to 900 bad ones to sort through. I'd greatly like to improve my programming!

 

any help/advice you could give would be much appreciated.

 

thanks,

 

-Jason

0 Kudos
Message 1 of 4
(2,684 Views)

Hi Jason,

 

It sounds like your analog output task and your input tasks are not in the same signal express project why is this?  I would send the output signal (wait a little for everything to work), take all my measurements and start this process again (30-execution time of the above) minutes later. 

 

If you post your Signal Express project I can probably assist you easier. 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 4
(2,670 Views)

Thanks for your response Jason.

The generate and aquire steps are both located in the same project. Step sequence is as follows: Create Analog Signal -> Generate Analog Signal (Voltage) -> Aquire Analog Signal (Voltage). The 'Create' step is a square wave with offset and duty cycle set to acheive a 4 second rise time every 30 minutes. The Generate step outputs the voltage through AO1of my PCI-6225. The 'Aquire' step is set to '1 Sample (on demand)' with a period set to 30 minutes. I hit run, and wait 30 minutes.....relay closes....4 second count....opens and then a few seconds later I can see the 'Aquire' table update but with data taken too late. When i repeat the above with a shorter period, say, 30 seconds, I can get good data for about 8 periods before it starts to drift out. I've tried playing with the pre- and post - delay, but seems to make it worse. I don't understand how the sequence works; how/if it repeats and in what order/when.

 

-Jason

0 Kudos
Message 3 of 4
(2,659 Views)

Jason,

 

It sounds like you want to use a digital signal to control the relay.  This has that same square wave look and you can trigger a read off of the digital change.  I think this will be easier to set up than using this crafted analog signal.  If this does not work for you we can contine to try to get the analog to work.  Please let me know if this is not possible.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 4
(2,642 Views)