Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Random character emplacement (Visa read)

Hello,

I want to acquire data from a IND560 ( scale terminal ) via RS-232. I made my VI with the Advanced write and read serial. Here my problem,  the IND560 send me data in a template form like in the model picture in joint piece. But when i run my VI the character in the indicator are randomly placed like in the picture in joint piece. Sometime they are well placed sometime no. 

 

Data are sent to the buffer and after i read 53 bytes from it. At 53 the data doesn't move in the indicator. So i try to reduce the space in my buffer and flush it but this didn't work. Do you have any idea for solve this problem. I want to get out the data  in 3 indicators so i need to know which is the first one second one and third one.

 

Thank you

 

P.S. Sorry my english is not very good.

Download All
0 Kudos
Message 1 of 7
(4,192 Views)

skling,

 

I'd like to make sure I'm understanding correctly. When you read from the buffer, after 53 bytes the read string indicator stops updating? Are you trying to determine what string to write to receive only one piece of information out? Or are you trying to read the three pieces of data at once and then separate them? I apologize for all the questions, but this may help others understand what's going on to provide more helpful suggestions and/or ideas.

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,152 Views)

No it's not what i means. I figured out my problem i think, my scale terminal always sends data, so when I start my VI i'm probably not at the first bit. To solve the problem I just stop the data flow from the terminal start my VI and restart the flow of data. Thank for your help and sorry if it's not clear.

0 Kudos
Message 3 of 7
(4,133 Views)

skling,

 

Does the scale transmit a termination character?  If so, make sure you configure VISA to use it.  Will make things much easier.

 

0 Kudos
Message 4 of 7
(4,118 Views)

Hello,

I found information about the termination characters at page 189 in the datasheet (joint piece), but i don't think its apply to my case. I add this

https://www.ni.com/en/support/documentation/supplemental/06/termination-characters-in-ni-visa.html

in my VI (cr and lf characters) but it's did not seem to works.

thank you for your help

0 Kudos
Message 5 of 7
(4,093 Views)

Can you add the vi.

Some people almost correctly apply  /r and /n in the wrong mode.

greetings from the Netherlands
0 Kudos
Message 6 of 7
(4,081 Views)

Hello,

 

Here my VI, I use this example ( https://www.ni.com/en/support/documentation/supplemental/06/termination-characters-in-ni-visa.html ) no 7.

 

thank you

Download All
0 Kudos
Message 7 of 7
(4,059 Views)