Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to createt two channels in AFG3102

Solved!
Go to solution

I'm  trying to create two channels on AFG3102 but we only manage to create one channel at a time .

can you explain how ?

0 Kudos
Message 1 of 11
(4,231 Views)

I'm not sure I understand the problem. Are you saying you cannot enable both channels at all or can you only enable one at a time? You have to, of course, send commands sequentially.

0 Kudos
Message 2 of 11
(4,212 Views)

I'd like to send two different signals  on two channels at the same time...


0 Kudos
Message 3 of 11
(4,206 Views)

Sorry, but those VIs are not in either of the LabVIEW drivers. Where did you get them?

 

What kind of errors do you get?

0 Kudos
Message 4 of 11
(4,201 Views)

Hey kamils,

It looks like you are using the IVI driver for the Tektronix 3000 Series AFGs (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=005994E37F5B2318E0440003BA7CCD... What Dennis is referring to is the LabVIEW Plug-and-Play drivers which should have similar functionality. Is there a particular reason why you've chosen the IVI drivers over the LabVIEW PnP drivers for this instrument? Both will work but they have different advantages depending on your application.

 

From looking at your code it seems that you're missing a few essential functions such as tkafg3k Configure Output Enabled.vi and tkafg3k Initiate Generation.vi. You are also setting the Output Mode to Standard Function when it should be Arbitrary Waveform. If you open up the .llb that ships with this IVI driver ("C:\Program Files\National Instruments\LabVIEW 2011\instr.lib\tkafg3k\tkafg3k.llb") then you should notice a group of shipping examples that should get you started. Take a look at tkafg3k Example - Arbitrary Waveform by Slot.vi as this seems to be close to what you are looking for (except it currently only does output for one channel instead of two). I hope this helps.

 

Lars L

0 Kudos
Message 5 of 11
(4,191 Views)

Choosing the project style driver has the advantage of having easy to find examples. Also, I've never seen any reason to use an IVI driver if you do not use the class driver. Using the specific IVI driver eliminates most of the reasons to use IVI, in my opinion.

0 Kudos
Message 6 of 11
(4,184 Views)

I saw this example, but is there example for one channel.  I have problem with slot, because when I sent signal to the first channel this signal is generation on the AFG3102, but when I would send signal to second channel the slot is not free, although the number slot is different... I don't know way...;/

0 Kudos
Message 7 of 11
(4,179 Views)

Hey kamils,

Are you trying to output the exact same waveform on both channels? I don't currently understand why you don't use different slots to provide the waveforms for each of the two channels.

 

Lars L

0 Kudos
Message 8 of 11
(4,177 Views)

Lars_L,

I use different slots and it ok. But I have second problem, when I generation waveform on the first channel the waveform is generated on the first and second channel...

I would like to have different waveforms on the both channels.

0 Kudos
Message 9 of 11
(4,167 Views)
Solution
Accepted by topic author kamils

Hey kamils,

I tried your VI with real hardware (I have a Tek AFG 3252) and it doesn't look like the generation was ever enabled for the first channel. Thus, when I ran your code it was setting up both slots but it was only turning on Channel 2. I added a Configure Output Enabled function to the end of the VI for Channel 1. I tested the modified code with my 3252 and scoped the outputs and it seems to work fine. Both waveforms are currently identical as you are giving the same data to both currently but this can be easily changed to fit your application. Take a look at the attached VI and let me know if you have any other questions.

 

Lars L

0 Kudos
Message 10 of 11
(4,146 Views)