Electronics > Beginners

Any way to reduce delay in LabView?

(1/3) > >>

LoveLaika:
Anyone ever worked with LabView before? I'm encountering a problem with it, and I'm at a loss on how to approach.

As a proof of concept, I'm using the software to output a sine wave from a waveform generator. I want to only output the sine wave for (in this case) 2 cycles. As you can see in the image of my program, I initialize the generator, configure the waveform, enable the output, wait for the amount of time calculated for 2 cycles, and disable the output.

The problem I'm facing is that it doesn't ideally start at V=0, the start of a cycle. Rather, the time to wait starts a little after the output has been enabled. So, rather than starting at the ideal time, the output sine wave has risen to a higher voltage than V=0 ideally when the waiting begins. Why is this occurring, and what can I do? I feel that it's a software delay of sorts, but I don't know how to make it more accurate.

joeqsmith:
This seems to be more of a question on how your Arb works.  You should be able to program it to send two sweeps when sending a trigger event.   Don't try and time this is software.   

joeqsmith:
Looks like GWI decided to ripoff the Tektronix model number.   Which arb do you have?   Provide a link to the programming manual.   

https://www.tek.com/en/products/signal-generators/arbitrary-function-generator/afg2000
https://www.gwinstek.com/en-US/products/detail/AFG-2100_AFG-2000

Sensorcat:
This has little to do with LabView. The operating system of any modern PC prevents any application program (like a LabView VI) to get direct access to hardware like an interface that is used to connect an instrument. The commands are transferred to the instrument when the operating system allows it. Without a real-time system, there's no way to force the system to use a precise schedule for that. The operating system arbitrarily assigns CPU time with little the application programmer can do about it (apart from tweaking priorities a bit).

Similar issues on the receiver side: There is no guarantee that a received command is executed in a fixed time.

So what to do then? Key is to let hardware do all time-critical stuff, not software. In your particular case, that means setting up the AWG to do the task completely, then, start it and let LabView stop it much later. However, it seems that the GW Instek AFG2000 lacks the function to do this: burst mode. This mode, available on most modern AWG, would let you set a 2 cycles burst as the output signal. If you do not have this, you can try to get creative with trigger / sync or ARB mode. But in the end, a more capable AWG is the better solution.

inse:
Cumbersome workaround if no suitable function generator is available: define the desired signal burst with a pause at the end as arbitrary waveform.
Use e.g. Excel to calculate and compile the waveform data to be sent to the AWG.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod