LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is sometimes data from WriteMeas Read instrument drivers zero?

Solved!
Go to solution

I have a labview program to command the motorized stage to rotate and measure light output using Konica Minolta CS-100A photometer.

Photometer is connected to PC through RS-232.

Program works fine yet, the data is zero at decussate format (please see below table), the error out shows status ok all the time, for row with zero data the error code is nothing, and for rows with the data there is an error code "107367629"

I also attach the program and some pictures, could someone help?

Angle Intensity x y   error code
0 340.1 0.443 0.405   107367629
10 0 0 0   0
20 345.99 0.443 0.405   107367629
30 0 0 0   0
40 343.33 0.443 0.406   107367629
50 0 0 0   0
60 335.73 0.443 0.406   107367629
70 0 0 0   0
80 323 0.443 0.406   107367629
90 0 0 0   0
Download All
0 Kudos
Message 1 of 9
(3,371 Views)

How does the value of the "read buffer" look like when zeroes are returned?

 

(Your code seems problematic with race coditions and serious overuse of local varaibles but that's probably not the problem here).

0 Kudos
Message 2 of 9
(3,345 Views)

"107367629" is a VISA Timeout error 

 

"0" is the default value for the Fract/Exp String To Number Function

 

So when your write-meas-read VI times out or receives invalid data it returns the value of 0

 

 

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 9
(3,311 Views)

Thank you RTSLVU,

How can I modify the program to get a continuos data?

 

0 Kudos
Message 4 of 9
(3,299 Views)

Hello Altenbach,

It is the same....

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

Hello everyone,

Could someone suggest a solution for this problem?

Thank you so much

 

0 Kudos
Message 6 of 9
(3,270 Views)

What is the return count value of the VISA Read function when you receive data and there is an error 107367629? You might ask for more bytes than the equipment is sending therefore the timeout error. Can you set a termination character instead?

 

Ben64

Message 7 of 9
(3,261 Views)
Solution
Accepted by topic author YBU

@YBU wrote:

Hello everyone,

Could someone suggest a solution for this problem?

Thank you so much

 


Sorry man, you know most of us here have jobs and help people on this forum in our spare time expecting nothing in return.

 

The first question is how is the serial data formatted? Does it have a termination character? That is to say does the data sent from the device always end with a carriage return or new line character? Most serial device do this.

 

S1.PNG

========================
=== Engineer Ambiguously ===
========================
Message 8 of 9
(3,226 Views)

Dear RTSLVU,

Thank you for paying attention to my problem, and thanks so much for clearly solved my problem,

You were right.

Thanks for helping people like me 🙂

0 Kudos
Message 9 of 9
(3,174 Views)