LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

triangular waveform analog output

Hello,

 

I want to send an analog output signal that changes with time:

-Increase from 0-10 V at a rate of (3.2/7 = 0.4571) V/sec

-Wait at 10V for 2000 ms

-Decrease from 10-0 V at a rate of (3.2/7 = 0.4571) V/sec

 

 

Which function would work best for this purpose?

I was trying to use the triangular waveform, but am not sure how to use it in a while loop because it isn't working as expected.

I have a Volt-time array which can simulate the signal...if only I knew how to use that to generate my waveform.

 

I'm using a Measurement Computing DAQ (USB 3103) with 16 bit resolution. Not sure if you need max sampling rate for analog output, it isn't there in the manual.

 

Thanks,

Prafulla.

0 Kudos
Message 1 of 5
(2,776 Views)
As slow as the outout is changing I'm not sure you need a function. The voltage will ramp up for about 22 seconds, stay high for 2 seconds, then back down (another 22 seconds) and then be low for 2 seconds -- for a total cycle time of 48 seconds, give or take a bit.

A real simple state machine would handle the job fine. All you would need is 4 states:

* ramping up
* hold high
* ramping down
* hold low

A shift register would hold the last value. The output update rate would depend on the output resolution and how smooth you want the signal. In any case you should have a simple low-pass filter on the output to filter high freq noise from the output.

What will this signal be driving?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,767 Views)
Consider the Ramp Pattern to generate your waveform. This just generates an array. You can use array to ramp up, a constant array for the soak, and another to ramp down. Concatenate into a single array and use the DAQ device timing properties if it supports hardware timed analog output.
0 Kudos
Message 3 of 5
(2,760 Views)

@mikeporter

 

The signal will be sent to a controller controlling the pressure in a hydraulic system from 0 to 5000 psi. I'll send an analog signal to the controller and the controller will send a PWM output to the valve.

 

The response time of the hydraulic system is very high, if I change the pressure by a 1000 psi, the flow takes about 2-3 seconds to stabilize, doesn't affect my application much though, as I don't need to control the pressure to a specific value. It just needs to go up to 5000 psi and back to zero and measure pressure-flow at equal intervals of time. The max pressure shouldn't exceed the rating though, which is almost always within +/-25 range of 5000 psi.

 

Thanks

Prafulla.

0 Kudos
Message 4 of 5
(2,752 Views)

@mikeporter

 

I'm trying to get the ramp pattern using a state machine.

Should my state change (from Ramp up to Hold high) when 22 seconds have elapsed (time-driven) or when the ramp function has ended (event-driven)?

How should I do either of them? I don't know how to check when the function has ended or how to measure absolute time inside a while loop.

Could you please provide an example VI for the same?

 

Thanks,

Prafulla.

0 Kudos
Message 5 of 5
(2,696 Views)