Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not communicate with the equipment

Thanks everyone. Here is the modified version-- test1.vi. I put all the string input to the left side of the Pick Line Function. And replace the GPIB RQS with VISA function: Wait For RQS.

I locate the address as the GPIB0::18::Instr, then run it step by step and found the output of the first Visa Write function is not right. The error code: -1073807339, the error explaining is : it occurred at an unidentified location. It seems the VISA can not identify the instrument. But in MAX, after Scan the Instrument, the primary is 18, and after Communicate with Instrument, the instrument can respond to the command: *IDN?. So that the instrument can be identified. I just wonder if there are some VISA functions which can identify the instrument missing in my VI.

Thank you so much for your help.

I am a graduate student and I don't have more experience on delevoping instrument drivers. But big thanks from my heart to you guys, you really give me many good advice. I wish I can finish it today.
0 Kudos
Message 31 of 47
(2,824 Views)
hi,

you need to change the VISA reference name as constant, and click it to select your device. If it is absent, use MAX to configure the card, and scan your instrument, then you should see it in the list of VISA constant.

Use default modes in VISA functions if not sure.

As one said, no comma at the end of the command string. Comma works as Separator between two commands.
0 Kudos
Message 32 of 47
(2,815 Views)
Thanks for your post. I deleted the commas in the input of the Pick Line Function. What does " VISA reference name as constant " mean?
0 Kudos
Message 33 of 47
(2,810 Views)
BTW, the error of the problem is still in VISA Write Function, the error code is same as before.
0 Kudos
Message 34 of 47
(2,812 Views)
Have you verified that the strings that you are using work in MAX? Assuming the instrument is listed in MAX under GPIB0 as Instrument0, you should be able right click and choose to communicate with instrument. I would open that up, and try writing to the instrument parts of the strings that you are trying to send. If the comma is problem this is an easy place for you to try out different combinations of strings.
0 Kudos
Message 35 of 47
(2,804 Views)
hi,

For VISA Open function, please use only two inputs: one for error in, and another for VISA reference name. For the latter, use VISA constant that you can find in the VISA palette. Then click on the Constant, you will find a list of your devices. That is all.
0 Kudos
Message 36 of 47
(2,802 Views)
hi,

see this attached picture for the VISA constant. then select your device in the list.
0 Kudos
Message 37 of 47
(2,795 Views)
You've now got Old VISA Open in your program. I'm not sure where that came from but you should use the VISA Open on the palette. You won't have a string and a VISA Resource Name as inputs - just the VISA Resource Name. When you click on the little arrow on the right side of the VISA Resource Name control, you should see a list of all available resource names. There should be Com1, LPT1, etc. and the resource name of your instrument that MAX found. Select that. Then you don't have to worry about syntax errors in your resource name. The correct name should be GPIB0::18::INSTR like you mentioned. You don't have that as the string name you're using with the Old VISA Open.
0 Kudos
Message 38 of 47
(2,793 Views)
Thanks a lot guys. I modified the test.vi. This program can control the instrument now but there is still an error in VISA Wait on Event in Wait for RQS.VI, the error code is:-1073807313, the explaining is: occurred at an unidentified location.

Thanks guys.
0 Kudos
Message 39 of 47
(2,794 Views)
hi,

it is clear that you need the event-relevant VISA function. See the VISA palette for the event icon list. Select event start and close functions, and put them before RQS wait and after RQS release respectively. Pay attention to the details in setting Event functions.

Please read the manual again for the RQS aspect. Is it really necessary to wait for it? Maybe you can replace them with checking the command-execution-complete byte.
0 Kudos
Message 40 of 47
(2,782 Views)