Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA reads 0 bytes at port

Solved!
Go to solution

Hi everyone,

 

I'm currently doing a project that deals with reading a thermocouple's temperature from a TEC controller (ATEC302) and displaying it on labview. However, it is not able to do so. I suspect the problem might be due to the fact that there's 0 bytes read at port using property node. It is able to read the number of data bits and baud rate but not the bytes at port. The controller is supposed to send 8 bytes of data to the computer for the reading process. Below are my block diagram and front panel.

 

Capture.PNGCapture 2.PNG

 

I'm still new to the functions of VISA read/write in labview and any help will be much appreciated. Thank you!

0 Kudos
Message 1 of 5
(5,937 Views)

I don't see a visa open and no visa init serial port.

 

greetings from the Netherlands
Message 2 of 5
(5,928 Views)
Solution
Accepted by topic author omgwthbbq

The Baud Rate and Data Bits are just settings for the serial port.  There should be no issue reading those.

 

Generally, the Bytes At Port should not be used.  You know how long your data message should be, so just tell VISA Read to read that number of bytes.

 

And according to the manual I found, the Baud Rate should be 19200.  Use the VISA Configure Serial Port to initialize your serial port.  The protocol is binary, so make sure the Termination Character is turned off.



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
Message 3 of 5
(5,905 Views)

First, Do you have the proper configuration according to the manual?

 

The controller can talk to PC through a dedicated USB cable or a RS232 communication daughter card

(option) that Accuthermo provides. And it comes with very sophisticated PC software for FREE.

 

The controllers can also be serial linked together and talk to one PC by using RS-485 communication

method (option).

 

Caution: When USB cable is connected to the controller, the RS232 or RS485 communication daughter

card should not be plugged inside the controller. Otherwise, it will have conflict.

 

Also, did you first verify that you are able to communicate with the instrument?  Try sending the hex message:

0x01031000000180CA

to request the Present Temperature Value.  The controllers response for this request in hex should be 8-bytes long.  The first byte is the controller address (0x01) followed by the request to read (0x03).  Next is a 2-byte value for the length of response in bytes (0x0002).  Now this should be the number of bytes listed in the previous field, which is a 2-byte value for the Present Temperature Value (Convert this value to decimal then divide by 10 for the temperature reading).  Lastly will be another 2-byte field containing the CRC.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 4 of 5
(5,900 Views)

 

Thanks alot! The baud rate was the issue to the problem. I have change it to 19200 and it's able to read it successfully. Thank you so much for the help again!

0 Kudos
Message 5 of 5
(5,890 Views)