LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using GPIB and labview

Solved!
Go to solution

Hi guys,

 

FInally got recognized my GPIB tool into labview, thats nice. I've created the block ( attached you can see te diagram ) but it works like 20 sec. I press continious run and i can change values in live mode, as i want. But then after 10 secs it appears the error that is in the screen and only working again if i reboot the Function Generator.


The model is Tektronix AFG3102.


Regards

Download All
0 Kudos
Message 1 of 31
(4,741 Views)

1. Do not use the Run Continuous.  That just creates nightmares when it comes to instrument control, even when debugging.  Use a loop instead.

2. You need to initialize the connection and close it.  Both of those should be outside of your loop (open before and close after)

3. You are likely sending the commands too fast.  The instrument is likely getting locked up due to the massive influx of commands.

 

I recommend you use a loop with an Event Structure in it.  Then you only send the commands when you actually change something.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 31
(4,728 Views)

Understood, but... i dont really know how to fit the event structure. Can you help me a little bit. Already seen a tutorial, kinda dunno what to do

0 Kudos
Message 3 of 31
(4,718 Views)

Stuck right here

Download All
0 Kudos
Message 4 of 31
(4,716 Views)

You would have a separate Event "Case" for each button, for instance, to adjust Amplitude, you would have a single case in your event structure for "Amplitude, Value Change" and inside that case you would drop the Amplitude control and wire it to the TEK amplitude API function you have from your driver set. Same goes for all the other functions, but you would Initialize outside of the event structure, then pass that resource name through to each event in the structure, and out of the structure to a Close.

 

 

CLD | CTD
0 Kudos
Message 5 of 31
(4,697 Views)

Also, no need for the Timeout case here.  And where is your loop?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 31
(4,692 Views)

I am in the right direction? Brodught me time out error 😞

0 Kudos
Message 7 of 31
(4,673 Views)

You need to put that VI at the bottom of your while loop inside the event structure, otherwise it will only run when the loop is first entered. For something like this I'd normally recommend you have a Type Def of controls considering there's many of them, and then parse through them within your VI but that may be a bit difficult. So copy and paste that VI at the bottom STDWFM and just pass the reference out from the itialize (you don't need VISA resource name out 2 indicator, delete that) and the output of STDWFM for Visa Out should be wired to the terminal like you currently have it, except change it to a shift register..

CLD | CTD
0 Kudos
Message 8 of 31
(4,668 Views)

And you still need to move your initialize to be BEFORE the loop and your close AFTER the loop.

 

I would have 1 event case for all of the controls and call the VI inside of that case.  Then you can wire the terminals directly to the VI inside of the case structure and you will always have the latest values for those settings.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 31
(4,662 Views)

Guys, i really appreciate your help. This **bleep** is really disturbing me.

 

I don't know if i am closer or even more far...

 

Regards

0 Kudos
Message 10 of 31
(4,655 Views)