Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I communicate on rs232 using Win 7?

The same VI works using XP.

 

I am able to use Hyperterminal in Win 7. It works fine.

 

I just can't seem to get Serial VISA functions to work.

 

I'm using Labview 8.5

 

I've attached the VI I'm using.

0 Kudos
Message 1 of 14
(4,487 Views)

is your version of VISA supported by win7?

greetings from the Netherlands
Message 2 of 14
(4,485 Views)

Yes. NI-488.2

 

Says so right on the CD.

 

0 Kudos
Message 3 of 14
(4,482 Views)

Since you are using Win7, the PC probably has faster CPU than the PC running XP.

You might want to try a delay after the write and before you query for the number of bytes on the port.

 

0 Kudos
Message 4 of 14
(4,478 Views)

@mot4755 wrote:

Yes. NI-488.2

 

Says so right on the CD.

 


What the heck does NI-488.2 have to do with anything related to serial communication? You also should know that LabVIEW 8.5 is not officially supported on windows 7. You should also know to connect an error out indicator to see what (if any) error you might be getting.

0 Kudos
Message 5 of 14
(4,473 Views)

Because I'm using the VISA Serial Pallet ??

 

Anyway, I tried delays, slow execution, breakpoints. I'm getting no data after the write.

 

No errors either.

 

Oh, and I tried VISA 5.0.3 too. No help.

 

0 Kudos
Message 6 of 14
(4,467 Views)

I meant I was using VISA 4.4.1 version

 

488 was a typo

0 Kudos
Message 7 of 14
(4,462 Views)

Do you have access to an oscilloscope to make sure data in going in and out of the serial port?  Where did you add delay?  You should put in a delay after writing the data and before reading (bytes at port node).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 14
(4,459 Views)

I'm glad you are now talking about the NI-VISA driver instead of the NI-488.2 driver.

 

So, is it returning 0 bytes? Your VI is not the best written for serial communication and a termination character. You are configuring the VISA Read to terminate on a LF character but you are sending a CR. When you have an instrument the uses a termination character, the VISA Read has to be configured the same way as what you are using for the write. You also do not use the VISA Bytes at Serial Port when the instrument uses a termination character.

0 Kudos
Message 9 of 14
(4,456 Views)

I was able to use the older serial functions to make it work.

 

Doesn't maks sense, but it works.

 

See screen shot.

0 Kudos
Message 10 of 14
(4,422 Views)