Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS- 232 communication error

Hi, i am using Labview 8 for Fluke hydra dataloggers. But programm offenly shows an  error either saying "at property node (arg1) in visa configure serial port (instr).vi" or "Occured at visa write". Gives the possible reasons as "resource is valid but visa cannot currently access it" or"Insufficient location information or the device or resource is not present in the system". I am not able to understand problem is with port or an instrument or with USB to Serial converter which i am using to connect the dataloggers to the computer.

 

Please help me in this reagard.

 

Thanks,

 

 

0 Kudos
Message 1 of 9
(5,350 Views)

Hi

 

it is a long time ago I used the hydar and will try to find the software. But I remeber that the instrument is critical about too many data too fast.

 

greetings from the Netherlands
0 Kudos
Message 2 of 9
(5,338 Views)

Hai, Albert

 

The "visa configure serial port (instr).vi" error has been rectified and the programm is running fine. Actualy i was configuring the port only once (i.e outside the while loop) when the programm starts. Now i am configuring the port after each output from the Hydra.

 

I would like to know,  is this related to buffer memory?.

 

 

Thanks,

0 Kudos
Message 3 of 9
(5,291 Views)

Hai, Albert

 

Fluke Hydra usualy gives the output in string form contains the last scanned values of all the channels.Output value is a signed number with decimal point and exponent as u can see below. But the thing is  Read string is not able to get the sign of the first channel as highlighted below.

 

0019.5E+0,-0024.4E+0,+0023.7E+0,+0093.9E+0

 

Please help me in this regard, 

 

Thanks, 

 

0 Kudos
Message 4 of 9
(5,289 Views)

Hi

 

sorry that I did not answer faster.

You probably solve a problem in the string read by reopening the port and at the same time crash the first character to be read.

 How about flow control?

 

Do you have an end character defined? And maybe also enabled the endcharacter?

Try to read again after the first string to see how many characters are left?

greetings from the Netherlands
0 Kudos
Message 5 of 9
(5,254 Views)

Thanks, for your response.

 

I have selected flow control none.Enable termination char is set to false.

I have modified the code by adding the followings in series as given below. 

Outside the while loop (VISA open-Set Buffer for write-Set Buffer for recieve-VISA serial config).

Inside the While loop (Flush buffer with mask 16 and 32-VISA Write for commands-VISA read). Tell me is this correct.

As you told, i am getting the same string twice. i am seperating the first string and sending to file.

I am opening and closing the port only once (both are outside the while loop).

 

 I have three dataloggers of Fluke make with RS232 communication.As each com port can take only one instrument. Is there any other way so, that i can get all the data loggers programmed through Labview.

 

Thanks,

 

0 Kudos
Message 6 of 9
(5,237 Views)

Hi

 

Why flush data inside a while loop?

This flush probably removes data already received.

Flushing once after opening is not necessary because opening also clears history data.

 

Having more comports can be realized with usb-com ports.

greetings from the Netherlands
0 Kudos
Message 7 of 9
(5,191 Views)

Hai,

 

Do you mean to say for each time I have to use VISA open and VISA close (inside the while loop) i.e. to read the data open the port and close once read,is it like that?

 

I thought of putting flush inside loop just because I experienced that the instrument simply stops after few hours of run and never accepts any

command until it is restarted. I guessed it is because of write memory exceeded.

 

And if I connect the three data loggers to individual com ports should I program in sequence. i.e.Open the first port-close it after reading the data and go for the second port. OR can I open all the ports at once and close all after getting the data from all the instruments.

 

Thanks, 

 

 

 

 

 

0 Kudos
Message 8 of 9
(5,179 Views)

Hoi

 

No I don't suggest to open and close in a loop.

I'm suggesting not to use flush until you exactly know why you should use it.

It is hiding information you need for understanding what happens.

greetings from the Netherlands
0 Kudos
Message 9 of 9
(5,158 Views)