01-27-2017 03:56 PM
I can test my instrument connection with the VISA test panel:
But when I try this:
I get this error:
What could I possibly be doing wrong?
01-27-2017 04:36 PM - edited 01-27-2017 04:37 PM
Is this a RS232 or some other interface? Do not you need some sort of init before committing the IDN command with the VISA Write? Like VISA Open, or VISA Configure Serial Port?
01-27-2017 05:08 PM
It's connected through ethernet and uses LXI so like a GPIB instrument it has not required a VISA open since about LabVEW 8 or so.
01-27-2017 05:14 PM
If you quick drop, is that the constant you get for end of line? I get one with a down arrow and enter looking thing (By picture, I'd assume eol/cr, but it's named end of line) If you use this one, does it work?
Have you tried looking at the output string in a // codes string indicator?
01-27-2017 05:30 PM - edited 01-27-2017 05:32 PM
@natasftw wrote:
If you quick drop, is that the constant you get for end of line? I get one with a down arrow and enter looking thing (By picture, I'd assume eol/cr, but it's named end of line) If you use this one, does it work?
Have you tried looking at the output string in a // codes string indicator?
Yes and this one (Line Feed) is the \n code just like the VISA test panel sends.
If it was the wrong terminator I would expect a different error, probably a timeout.
01-27-2017 05:52 PM
True. I missed the error. If you open up any of the VISA examples, I'd expect to see the same error if we're looking at addressing. Do you?
01-27-2017 06:39 PM
01-27-2017 08:48 PM
01-30-2017 09:46 AM - edited 01-30-2017 09:47 AM
@ben64 wrote:
I would try launching I/O Trace and compare the result from both cases.
Ben64
1. viWrite (TCPIP0::LCRY0614N49625::... (0x028B4920), "*IDN?.", 6, 6) Process ID: 0x000006FC Thread ID: 0x00002330 Start Time: 07:28:13.514 Call Duration 00:00:00.002 Status: 0 (VI_SUCCESS) Buffer Contents 00000000: 2A 49 44 4E 3F 0A *IDN?. 2. viRead (TCPIP0::LCRY0614N49625::... (0x028B4920), "*IDN LECROY,WR44XI-A,...", 1024, 42) Process ID: 0x000006FC Thread ID: 0x00002330 Start Time: 07:28:13.571 Call Duration 00:00:00.001 Status: 0 (VI_SUCCESS) Buffer Contents 00000000: 2A 49 44 4E 20 4C 45 43 52 4F 59 2C 57 52 34 34 *IDN LECROY,WR44 00000010: 58 49 2D 41 2C 4C 43 52 59 30 36 31 34 4E 34 39 XI-A,LCRY0614N49 00000020: 36 32 35 2C 36 2E 38 2E 30 0A 625,6.8.0. 3. viParseRsrc (0x12B19590, "TCPIP0::LCRY061...5::inst0::INSTR", 6, 0) Process ID: 0x000022E0 Thread ID: 0x00001CF0 Start Time: 07:28:20.144 Call Duration 00:00:00.000 Status: 0 (VI_SUCCESS) > 4. VISA Write ("TCPIP0::LCRY061...5::inst0::INSTR", "*IDN?.") > Process ID: 0x000022E0 Thread ID: 0x00001CF0 > Start Time: 07:28:20.160 Call Duration 00:00:00.006 > Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND) > Buffer Contents > 00000000: 2A 49 44 4E 3F 0A *IDN?. 5. VISA Close ("TCPIP0::LCRY061...5::inst0::INSTR") Process ID: 0x000022E0 Thread ID: 0x00001C38 Start Time: 07:28:41.512 Call Duration 00:00:00.001 Status: 0 (VI_SUCCESS)
I can see a couple differences, the main one being the VISA test panel DOES NOT USE VISA?
1-viWrite and 2-viRead are the VISA test panel, 4-VISA Write my VI and that is where the error occurs.
There is a couple subtle differences
1. viWrite (TCPIP0::LCRY0614N49625::... (0x028B4920), "*IDN?.", 6, 6)
3. viParseRsrc (0x12B19590, "TCPIP0::LCRY061...5::inst0::INSTR", 6, 0)
4. VISA Write ("TCPIP0::LCRY061...5::inst0::INSTR", "*IDN?.")
I still don't know what to make of this.
01-30-2017 10:13 AM