Test and Measurement Forum

Pico 2207 AWG in Labview

Post your LabVIEW discussions here

Pico 2207 AWG in Labview

Postby obideluxe » Wed Mar 04, 2015 10:35 am

Hey,

I am quiet new in using the PicoScope 2207 in Labview and I have some problems in creating a signal to GEN-Channel of the device.
I have tried to use the PicoScope2000aExampleAWG.vi but it doesn't really work in my case.
PicoScope2000aExampleAWG.vi
(22.88 KiB) Downloaded 63 times


I created a csv-File in PicoScope6 and tried to use that one, but I have no idea, why it doesn't work.
Arbitrary function .csv
(12 KiB) Downloaded 39 times


My object is to use an ultrasonic sensor in labview. With the PicoScope6 Software it worked well with my settings
PicoScope2000aExampleAWG.vi
(22.88 KiB) Downloaded 63 times

but I don't really know what could be the problem in using the examples.

I would appreciate any help and hints. Thanks a lot in advance!

Bye,
Felix
Attachments
Settings Ultrasonic measurements.pssettings
(3.2 KiB) Downloaded 39 times
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am

Re: Pico 2207 AWG in Labview

Postby obideluxe » Wed Mar 04, 2015 3:02 pm

Ok, I managed it to put a signal on the GEN-Channel. There was simply a problem with the voltage.

I have tried to combine the stream and AWG.vi now, but it didn't work.
I would like to put a signal to the GEN-Channel, stream the "response" of my ultrasonic sensor on the A-Channel
and set the GEN-Channel as a trigger. After that I should get the time my ultrasonic need to get to the object.

Thanks for any help.

Kind regards,
Felix

PicoScope2000aExampleStreaming.vi
Combined Version that doesn'twork
(36.32 KiB) Downloaded 46 times
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am

Re: Pico 2207 AWG in Labview

Postby obideluxe » Fri Mar 06, 2015 11:19 am

Nobody out here that can provide some help :wink: ?

I would really appreciate any help, because I have to find a solution for that problem soon.

Kind regards,
Felix
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am

Re: Pico 2207 AWG in Labview

Postby Karunen » Fri Mar 06, 2015 1:13 pm

Hi Felix,

I have taken a look at your code and what you need to do is set up the signal generator before PicoScope2000aStartStreaming is called.

Unfortunately I am not exactly sure what you require.

If you can provide me with a step by step instructions for what you require I might be able to provide more specific information.

For example do you need to use the software trigger or do you wish to trigger the signal generator using the scope?

If you do not wish to provide this information here please send it to support@picotech.com.

Kind Regards,
Karunen

Technical Specialist
Pico Technology
Karunen
Zen Master
Zen Master
 
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Pico 2207 AWG in Labview

Postby obideluxe » Fri Mar 06, 2015 1:57 pm

Hi Karunen,

thanks for your reply.
I will try to explain my problem more concrete.

I have an ultrasonic sensor that can send an ultrasonic impulse and detect the impulse when it is thrown back by a wall for example. Betwenn sending one impulse and receiving it back from the wall there is a time difference.
This time difference delta_t multiplied by the speed of an ultrasonic wave gives me the distance between my sensor and the wall. It workes fine with PicoScope6.

So, the steps I would like to realise in Labview are:
1) Sending an impulse (2V with 500microseconds pulse width with 20Hz) on the GEN-Channel of the Picoscope
2) Trigger that impulse
3) Stream on the A-Channel the "answer". So that I can see how long my sended impulse takes to go to the wall and come back.

If I have that time difference delta_t I would be soooooo happy :D
I have tried to fix my previous Vi.Now I am able to send an impulse and I can see on the chart the answer
but I don't know how to implement the trigger so that I can get the time difference delta_t.
UltrasonicWave.vi
(34.77 KiB) Downloaded 55 times


Thanks in advance for your support and your time.

Kind regards,
Felix
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am

Re: Pico 2207 AWG in Labview

Postby Karunen » Fri Mar 06, 2015 3:11 pm

Hi Felix,

Are you outputting constantly using the signal generator?

I might be better to measure the amount of samples between the rising edges (http://forums.ni.com/t5/LabVIEW/How-can-I-measure-the-time-between-each-two-successive-rising/td-p/2228206).

The PicoScope2000aGetStreamingValues.vi can return values about the trigger for example which section of data it occurs and where it occurs in that section of data. Please note the triggeredAt value is the number of samples from the start index not the index value.

Kind Regards,
Karunen

Technical Specialist
Pico Technology
Karunen
Zen Master
Zen Master
 
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Pico 2207 AWG in Labview

Postby obideluxe » Fri Mar 06, 2015 3:24 pm

Hi Karunen,

yes, I am outputting constantly with the signal generator.
Your link is a good hint and you are right, that the idea of measuring the amount of samples could be better.

How can I display the signal that I put on the GEN-Channel? So how can I read that channel to get the number of samples from the start when the rising edge starts on the GEN-Channel?

Thanks again for your help!
Felix
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am

Re: Pico 2207 AWG in Labview

Postby Hitesh » Tue Mar 10, 2015 4:51 pm

Hi Felix,

I have responded via your e-mail support request - below is excerpt for the benefit of other Users:

I suggest calling the following functions/sub-vi blocks:

1. PS2000 Open
2. PS2000 Settings
3. PS2000 Wrap Settings
4. PS2000 AWG
5. PS2000 Stream
6. Call ps2000aSigGenSoftwareControl with the state parameter set to 1
7. Loop (as you currently have it but add an output for channel B)
8. Call ps2000aStop
9. PS2000 Close

For the AWG, you just need to configure the settings to output 1 shot on a software trigger with the desired frequency setting. You can use the csv file as the sub-vi will convert the values.


I would suggest splitting the signal generator output using a BNC T-connector so you can then view the output on Channel B and send the signal to your sensors.

Once you start streaming, you need to keep track of the number of samples collected (which the example does). When the trigger event occurs, you simply need to know the total samples collected previously plus the number indicated by the triggeredAt parameter which you can find via the PS2000 Get Str block. Please note that the index value is zero based.

I hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2063
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Pico 2207 AWG in Labview

Postby obideluxe » Mon Mar 16, 2015 10:29 am

Hi Hitsh,

thanks for your reply. With your support my program is working now.
Your hints were just great.

I have connected a BNC T-piece between my AWG-Channel and Channel B so I can display what I am currently generating.
Now I can trigger my signal what I am getting on channel A so that I can calculate the time between sending the signal and receiving a signal that is for example reflected by a wall.

I am using that to get a precise prosition of an object that is moving on an assembly line.
The precision is abot +- 2mm but that is normal according to the sensor type.

Kind regards,
Felix

So thanks again Hitsh.
obideluxe
Newbie
 
Posts: 0
Joined: Wed Mar 04, 2015 10:20 am


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests