Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1210 occurred at gx3x0 Configure.vi

Hi there,
Has anybody got idea what is wrong with my code?
Error occurs first at the output of gx3x0 Configure.vi.
error_1210.jpg

0 Kudos
Message 1 of 17
(5,436 Views)

Can you see that this device is connected to COM4?  Your error in the Config.vi seems to indicate that one of the setting you give that VI is incorrect.  Can you test the settings on the front panel to make sure that they work, then use those in code?  I think you probably have to specify parameters for every input to the VI, defaults might be causing an issue here.

 

Once you get that problem fixed you'll want to move that Close.vi out of the while loop.  Not sure what the first VI in the while loop is, but once you call the Close.vi and close communications to the instrument you likely won't be able to execute that on the next loop iteration.

 

0 Kudos
Message 2 of 17
(5,425 Views)

 Yes, i can see COM4 is recognised by windows. I can't add anything else to "Initialize" function but the number of COM port.

E.g.: Earlier i made a code in which there was Agilent 33220A function generator that had more properties to set. Thus I could get a running code.
agilent.jpg
But, in my current project relating to Metrix GX320 there is no serial configuration.

Datesheet reads :
'The new COM port is configured as follows:
- speed: 19200 bauds
- data bits: 8
- parity: none
- stop bit: 1
- protocol: hardware (RTS / CTS)'

and

'All the devices GX 310 or GX 320 – whether programmable or not –
respond to the IEEE488.2 *idn? command which returns the device
identification and version.'

It is okay, i'll move Close.vi out of the while loop.
Thanks for your help.

0 Kudos
Message 3 of 17
(5,419 Views)

I wasn't referring to the setting for INIT, but to Configure.vi.   Did you try to specify something for every input (Duty cycle, freq, etc..)? 

 

I think by not specifying some inputs you are either telling it they are 0, or accepting some default that it doesn't like.  Try a set of parameters that works with what you can setup on the instruments front panel.  

 

0 Kudos
Message 4 of 17
(5,414 Views)

Are you using a USB-RS232 adaptor?  

 

You did try using NI-MAX to communicate with this instrument at COM4?  (*IDN?\r)

And you got the right reply?

 

If so that's good and its not a problem with the cable/physical connection.

 

Craig

0 Kudos
Message 5 of 17
(5,412 Views)

Instrument has built in "Silicon Labs CP210x USB to UART Bridge". I have tried to configure COM4 in Windows, but i still get error code:1210.
Then I opened NI MAX:
port_settings.jpg

For some reason I cannot change port setting in NI MAX.

0 Kudos
Message 6 of 17
(5,396 Views)

Ok, so you can see it in NI-MAX.  (No need to change the port setup!) 

Can you open a test panel and communicate with the instrument?

0 Kudos
Message 7 of 17
(5,390 Views)

Yes, i can communicate with instrument in NI MAX.comm.jpg
Note: I added gx3x.LLB and gx3x.dll to my project at the very beginning. Using functions provided by manufacturer. 
Even though i get that Error 1210 now.

Have you got any ideas what may cause this issue?


0 Kudos
Message 8 of 17
(5,379 Views)

Please see the attached VIs I use:

Download All
0 Kudos
Message 9 of 17
(5,375 Views)

Ok, now I see it.  It was staring us in the face in the first screen capture you posted...but I missed it.  Just to confirm I downloaded the driver and tried myself.  It seem the creator of the driver used non-standard terminal configuration where the top left terminal is the serial port id, but the top right is an integer reference to an error.  So unlike most instrument drivers you can't simply chain driver VIs together and have the instrument id flow left to right. Nasty trick!  

metrix_gx3x0_example.png

 

 

Give this a try.  I think you were always successfully initializing communications with the first VI which returned a 0 for error integer, which was past as the serial port id to the next VI which is of course wrong so it caused an error.

 

Personally I'd be inclined to explode that LLB, rework all the VIs and save my own version of the driver that you could wire like other drivers.

 

Let me know if that helps.

Craig  

0 Kudos
Message 10 of 17
(5,369 Views)