Test and Measurement Forum

Picoscope 4824 Combine Stream and AWG vi

Post your LabVIEW discussions here

Picoscope 4824 Combine Stream and AWG vi

Postby Henrike » Fri Mar 09, 2018 5:12 pm

Hello all together,

I am using the Picoscope 4824 and I am currently trying to combine PicoScope4000aExampleAWG.vi and the PicoScope4000aExampleStreaming.vi. I have stripped both vi's of some functions I do not net right now and adapted them to my project and both work perfect individually. When I want to combined the stream and AWG vi, as shown in the attachment, I am able to receive my signal on Channels A - H, but I am not able to produce an output signal via the Gen channel.

Currently its wired in the following order:

Open - Settings - WrapSettings - StartsStreaming - AWG - GetStreamingValues - Close

but I have also tried swapping AWG and GetStreamingValues :

Open - Settings - WrapSettings - StartsStreaming - GetStreamingValues - AWG - Close

Could someone maybe point out to me, how I would have to wire everything together, so I am able to receive signals and generate a signal in one combined vi.

Thanks you vey much.

Henrike
Attachments
Example_Stream_AWG_vi.png
Example Combined Stream and AWG vi
Henrike
Newbie
 
Posts: 0
Joined: Fri Mar 09, 2018 4:40 pm

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Martyn » Fri Mar 09, 2018 9:51 pm

Make sure you start the AWG before starting the streaming.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3043
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Henrike » Mon Mar 12, 2018 11:13 am

Hello Martyn,

thanks for your reply. But when I place the AWG before StartStream, the AWG is not included in the while loop anymore and does no react to anything. And including the StartStream and the AWG into the while loop slows the stream down by a lot. How and where would I have to place the AWG?

Thank you

Henrike
Henrike
Newbie
 
Posts: 0
Joined: Fri Mar 09, 2018 4:40 pm

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Martyn » Mon Mar 12, 2018 12:40 pm

You need to use this setup

Open - Settings - WrapSettings - AWG - StartsStreaming - GetStreamingValues - Close

If you need to be able to change the AWG setttings before running the streaming, then code this so that you can't move on until you apply the settings.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3043
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Henrike » Mon Mar 12, 2018 1:18 pm

Hello Martyn,

I actually would have to change the AWG parameters (Voltage and Frequency) WHILE still keep the stream running. So therefore I initially thought I could included it into my inner while loop. How would I have to code it otherwise, when the AWG is actually outside the inner while loop?
Sorry, this might be a very easy an obvious question, but I am quite new to LabVIEW and I am still finding and learning new things, but for now a while loop seemed to be the only option I could see. I would be very thankful if you could help me out a bit more.

Regards.

Henrike
Henrike
Newbie
 
Posts: 0
Joined: Fri Mar 09, 2018 4:40 pm

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Martyn » Tue Mar 13, 2018 9:21 am

You need to call the function before starting to stream to get things going, it is then possible to change some parameters including frequency but not voltages whilst the scope is streaming.

From page 92 of the Programmer's Guide
Code: Select all
in general, this function can be called with new arguments while waiting for a trigger; the
exceptions are the arguments offsetVoltage, pkToPk, arbitraryWaveform, arbitraryWaveformSize and operation, which must be unchanged on subsequent calls, otherwise the function will return a PICO_BUSY status code.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3043
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope 4824 Combine Stream and AWG vi

Postby Henrike » Fri Mar 16, 2018 10:42 am

Hello Martyn,

thanks for your reply. As recommended by you, I have placed the AWG in between WrapSettings and StartsStreaming, which means the AWG is now outside the inner loop and does not get updated when changing its parameters. I then implemented an Update Button into the inner loop, so when I need to change the parameters of the AWG, this button stops the inner loop, going to the outer loop, where my AWG gets updated and its goes automatically back into the inner loop, where my streaming will start again. Like this I get a short period of time, where my streaming is not being performed, but its basically not recognizable in the graphs and it does not affect my application.

Its probably not the perfect and most elegant solution, but it works for me and my application for now.

Thanks again for your help Martyn.

Henrike
Henrike
Newbie
 
Posts: 0
Joined: Fri Mar 09, 2018 4:40 pm


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests