AFG3022C transfer waveform using VISA

Post Reply
Posts: 1
Joined: March 3rd, 2016, 7:00 am

AFG3022C transfer waveform using VISA

Post by florian.neacsu » March 3rd, 2016, 7:49 am


I want to transfer a waveform into arbitray memory of the tektronix signal generator using VISA commands.
I tried to use viWrite(vi, (ViBuf) "DATA:DATA EMEMory,#42000<DAB><DAB>...<DAB>", 24, &retCnt) but I don't know exactly how to define the binary block data.
My code:
status = viWrite(vi, (ViBuf) "DATA:DATA EMEMory,#180000011111010000000001111101000000000111110100000000011111010000", 86, &retCnt);
status = viWrite(vi, (ViBuf) "DATA:COPY USER1,EMEMory", 24, &retCnt);
status = viWrite(vi, (ViBuf) "FUNCTION USER1", 15, &retCnt);
status = viWrite(vi, (ViBuf) "OUTPut1:IMPedance MAXimum INFinity", 35, &retCnt);
status = viWrite(vi, (ViBuf) "SOURce1:VOLTage:LEVel:IMMediate:HIGH 3.375V", 40, &retCnt);
status = viWrite(vi, (ViBuf) "SOURce1:VOLTage:LEVel:IMMediate:LOW 0V", 40, &retCnt);
status = viWrite(vi, (ViBuf) "SOURce1:FREQuency:FIXed 0.172413793103448Hz", 44, &retCnt);
status = viWrite(vi, (ViBuf) "SOURce1:BURSt:STATe ON", 23, &retCnt);
status = viWrite(vi, (ViBuf) "SOURce1:BURSt:MODE TRIGgered", 29, &retCnt);
status = viWrite(vi, (ViBuf) "TRIGger:SEQuence:SOURce EXTernal", 33, &retCnt);
status = viWrite(vi, (ViBuf) "TRIGger:SEQuence:SLOPe POSitive", 32, &retCnt);
status = viWrite(vi, (ViBuf) "OUTPut1:STATe ON", 17, &retCnt);[/color]

I receive positive answer to all commands but the curve is not loaded.
Does anyone have any idea?

David N
Tektronix Applications
Tektronix Applications
Posts: 416
Joined: July 31st, 2008, 8:26 am

Re: AFG3022C transfer waveform using VISA

Post by David N » March 9th, 2016, 9:48 am

There is a Python example for creating and sending a waveform to the AFG3000 that may help with your program coding. Refer to which in another post in the forum.

Post Reply

Return to “AFG1000/2000/3000 series”

Who is online

Users browsing this forum: No registered users and 1 guest