LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR 1073676294 ????? VISA READ...!!

Solved!
Go to solution

How u guys doin /.?

 

i got the above error while reading data from my ECG sensor via serial port ..would you guys help me with the following steps ?

 

1 - i can see that there is a signal showing up , disappears a second and and then returns appearing and so on.

2 - the number of read bytes ranges from 1 to 2 only .... i think that's impossible .... i am sending an ECG signal so bytes number supposed to be much higher.

 

 

the attached picture can show you the result i am gettin ... 

 

any help would be appreciated !

Bill David
Download All
0 Kudos
Message 1 of 10
(10,455 Views)

You don't have an error.  You have a warning.  (the number is positive and the boolean status is a checkmark, False for error.)

 

Have you searched the forums for that number to see other people who have asked the same question?

 

The message tells you what you that you have received exactly the number of bytes you've asked for, and there are potentially more bytes in the serial buffer.  (I actually feel this is a stupid warning message because a programmer should be smart enough to realize more bytes might be present.)

 

Your baud rate is 9600 which means you are going to get approximately 1000 bytes per second at full speed, or one byte per millisecond.  Your loop is set with a timing of 5 milliseconds, so at most you could have 5 bytes arrive at the port each iteration.  One or two bytes certainly seems reasonable, especially if the device puts some time between different messages.  You haven't said what protocol the data is supposed to look like.  What are you expecting as a message?  Is it binary, 1 byte means something, 2 bytes ???  ASCII formatted data?  How to you convert from what what you receive to something that has some sort of meaning?

 

How much data are you really expecting to arrive in 5 milliseconds?

0 Kudos
Message 2 of 10
(10,453 Views)

Dear Ravens Fan

thank you for the fast reply .

yeah first of all i searched for the error code and some guys said that it's an error , other guys said it's nothing so i wanted to make sure .

concerning your questions..


1 - i am actually using 19200 as a signaling rate .that's why i am wondering why the bytes read indicator says i am reading one or too bytes every iteration.does it make sense ?

 

2 -the data i am trying to send is an ECG signal from a microcontroller (16f874) which has an internally built-in A/D .

 

and lookin at your answer (not an error ) still getting a signal that looks like a triangular one .... 

 

 

any suggestions ?

 

 

Bill David
0 Kudos
Message 3 of 10
(10,449 Views)
Solution
Accepted by topic author Bildavid

It looks like the LabVIEW code, at least the serial portion, is working fine. If the waveform is not correct, check your sensor connections and the programming of the micro.

Message 4 of 10
(10,419 Views)

Looking closer, I'm not sure the conversion from the string to numeric value is at all correct. Can you run the VI until you have some data in the string indicator and then do an Edit>Make Current Values default? Save it and attach the saved VI. The conversion is correct if the micro is sending ASCII but not if it is raw hex. And I think the conversion requires spaces between bytes. Is your micro code doing that? Do something simple such as wiring up a String to Byte Array function to the VISA Read string and wire the output of the String to Byte Array to a chart.

Message 5 of 10
(10,395 Views)

Dear Dennis
thank you for the reply so far,
first of all, my micro codes consist of converting the incoming analogue data to digital then sending the data serialy (UART).
the microcontroller produces a byte (8bit) with a start bit for the receiving side to recognize that data transfer begins, after that and according to the signaling speed (19200 baude rate ),the data transfer is done . the transfer of the block ends when a stop bit
is detected . so it is 10 bits . a byte , a start bit and an end bit .

 

concerning the things you told me to do . i have broken leads right now, so m gonna buy new leads
and let you updated.

 

thank you . 

Bill David
0 Kudos
Message 6 of 10
(10,368 Views)

Dear Dennis

 

i just highly suspect that wiring a string to byte array function to the read strin of the VISA read function then connect it to a waveform chart would give  a real signal... if so how the conversion from bytes to numbers would be done,? so the numbers would be plotted ?

 

am i missing some knowledge right here ?

 

 

thank you .

 

Regards.

Bill David
0 Kudos
Message 7 of 10
(10,365 Views)
The bytes ARE numbers. If you want to scale them, look at how it's being done in your program.
0 Kudos
Message 8 of 10
(10,357 Views)

Regarding to byte interpretation:

 

I byte contains 8 bit. 

It depends on what the byte signifies. .

For example: Unsigned 8(U8) is a number between 0 and 255.

                    Integer 8 (I8) is a number between -127 and 127

            a char is also represented using 8 bits.(ASCII code)

So, the conversion depends on the representation and on the signification of the data. 

 

Your application is not quite simple, so I would suggest the following:

1. Verify your code from the microcontroller

2. I would suggest you to use on the input of the microcontroller(uC) ADC a DC voltage that is in the range for the uC.

3. Use a client like putty http://www.chiark.greenend.org.uk/~sgtatham/putty/ and read continuously the serial line from your PC.

4. Modify the input voltage form the minimum value to the maximum value(depending on the uCs range) and see if the data received from the serial line corresponds with the voltage you provide to the adc. If not, the problem is not with VISA communication, but with the uC code, configuration of serial line or signal conditioning

5. Make a simple LabVIEW application and read the values using VISA and see if you receive correct data. If you receive the correct data, then the problem has nothing to do with VISA communication. 

6. If you don't receive the correct data(like the data from putty) be sure you have the correct configuration of the VISA communication port.

 

 

Best regards,

Cristi

 

 

0 Kudos
Message 9 of 10
(10,337 Views)

Hi cristitranca

 

THANK YOU for the very very useful details you provided.i will exactly do the same steps.and i will keep you updated.

 

thank you very much .

 

 

Regards

 

Bill David
0 Kudos
Message 10 of 10
(10,320 Views)