Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

TG1304 Driver

Go to solution

hello all,


am programming a TG1304 function generator through its driver and I had some problems related to the following code:


status = tg1304.init(3,0,0,insID)


' to initialize the instrument (3 gpib address, 0 to query id, 0 no clear, insID id of the instrument returned from initialization)



'status is a variable that returns the code after execution of the statement and here status=0 which means no error'


status = tg1304.config_main(0,1,1000,2)

'to configure the main output with (0 sine wave function, 1 to turn the output on, 1000 frequency in Hz, 2 peak to peak voltage)



'status here = -1 which means invalid instrument id


can any one help me with this type of problem.


Help please



0 Kudos
Message 1 of 4

If that config statement is an exact copy from your code, then of course you get that error. Your statement has no insID parameter.

Message 2 of 4



thats right but it takes only the four parameters i used, what i noticed that each function that takes the insID works just fine, but the functions that don't take it gives an error, so do you know how to fix that, can i fix the code of the driver????



0 Kudos
Message 3 of 4
Accepted by Ala Ayesh

Hello all,


Yes Mr.Dennis you are right that was the problem and i had fixed the .fp file because the code in .c file takes the instrument id as a parameter and so what i need to correct is the .fp file, so for any one that will have the same problem of me here is the solution:


The solution for TG1304 instrument driver is that you have to adjust the .fp file of it using labwindows/CVI, all you have to do is to copy the instrument id parameter from the other function such as close and place it in the panel for config_main and config_aux and then every thing is going to work correctly.


thanks for all your help.I hope this will help any one having the same problem.


but am still having a problem with the oscilloscope (mxox802x instrument driver) and it still gives me an "interpreting instrument response" error so can anybody help me with this kind of error am still unable to solve this error.


please help

Message 4 of 4