LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Assistance on Serial Communication, Error -1073807339

Hello,

I am trying to communicate via serial with a water bath device, more specifically the ARCTIC A25 Refrigerated Circulators from Thermo Fisher Scientific. I know that the connection is there because in Tera Term and in Nettest, the Thermo Fisher troubleshooting application for RS-232, the commands are being asked and the correct responses received successfully. However, for some reason, in LabVIEW, I am able to write to it with no problem, but get the error -1073807339, the timeout error, when I try to read from it. I'm not sure why that is happening because I've triple checked that all of the settings are correct. I've also tried changing the termination char settings and increasing the timeout, but it hasn't been successful. If anyone has any ideas on what I should try, I'd greatly appreciate the help. Thank you.

0 Kudos
Message 1 of 8
(671 Views)

Rachel,

 

The VISA timeout error you're reporting is easily the most common complaint when troubleshooting serial communications.  I appreciate that you've put effort into trying various fixes.

 

Rather than suggesting a specific setting you might have overlooked, I'm going to suggest you make use of a debugging technique - pop up on the VISA instr refnum wire feeding into the point of failure (undoubtedly a VISA Read node), and select a "custom" probe of type VISA Instr, or VISA Serial Instr class.  (Right-click your VISA source to specify its class as Serial Instr rather than generic Instr so you will have some additional serial-specific info revealed on the probe. You may have to do this at a couple of places in your code if you're passing the refnum between VIs.)

 

After running, pay particular attention to the "transfer settings" details of the probe.  You may want to screen shot this info and post back here so we can get a better idea of why this is not working as expected.

 

Below is a screen grab, not a snippet, to show a probe on a serial Instr class wire.

 

Hope this helps!

 

Dave

 

DavidBoyd_0-1719512119258.png

 

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
Message 2 of 8
(646 Views)

It will be much easier to help you if you post the code.  Back save to 2018 (File > Save for Previous Version...) so most of us can open it.

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 3 of 8
(641 Views)

In this case I’m ok with not having all of the OP’s code to inspect; but it’s pretty vital to see the wealth of state info the probe will give us on the VISA ref wire passed to the VISA Read node where the timeout occurs. Generally it’s the:

- wrong termchar, or

- termchar enable not TRUE, or

- end mode not set, or

- baud/data/stop/parity incorrect (they thought it was, but the values got clobbered down the chain)

 

Given that other software is reported to have worked, we can likely rule out wiring, so there’s that!

 

EDIT: could be an issue with the presumed VISA write (if the host needs to request a reply), where it’s missing termchar, or even double-specified. So yeah, code to inspect isn’t a *bad* thing…

 

Dave 

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
Message 4 of 8
(621 Views)

Hi NIquist,

Thanks so much for your response. So I switched from the code that I had been using to the Simple Serial.vi example in Help->Find Examples->Hardware Input and Output->Serial because my previous code was essentially a simplified version of that. With this switch, there is no longer a timeout error, however, there seems to be no response at all anymore (pic below). What would I need to do now? I appreciate your help.

 

Best,

Rachel

 

rachelha54_0-1719598534810.png

 

0 Kudos
Message 5 of 8
(599 Views)

Hi Dave,

Thanks so much for your response. I'm going to be honest, I am not the most familiar with LabVIEW so I may need a bit more guidance. I'm a bit confused on what you mean/where I need to go to find the part to "pop up on the VISA instr refnum wire feeding into the point of failure." If you could step me through that as well as some of the following parts, that would be great. Thanks again and I appreciate your help.

 

Best,

Rachel

0 Kudos
Message 6 of 8
(597 Views)

Per the manual, the commands are terminated with a Carriage Return (0xD).  You are using a Line Feed (0xA).  So with your VISA Configure Serial Port, set the termination character to 0xD or 13 (13 decimal = D hex).  Then when you send the command, you need to use '\r' instead of '\n'.


GCentral
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
0 Kudos
Message 7 of 8
(583 Views)

Rachel,

 

Apologies, "pop up on" is old LabVIEW developer-jargon for using the right-click menu, in this case, on the block diagram of the VI where the timeout error is occurring and for the present effort, doing it upon the wire which supplies the VISA reference to the VISA Read node.  On the flyout menu list which appears for that wire, access the menu item which allows you to place a "probe" on the wire.  Then you'll get a window listing all such probes.  They function just like a "watch variable" in a text language environment, and include a "last updated" timestamp as the code executes

 

I suggested this since it's an excellent debugging tool to master for a newcomer to LabVIEW development - it helps you understand what your code is doing as dataflow passes from source to destination.

 

Crossrulz picked up on something specific, and vital - the online manual I found for this device (I found later yesterday) specifies a carriage return char as a line terminator.  Apparently you've been using a linefeed.  There's a VISA property node buried in that serial example code where you specify the termchar numeric value, which for CR is 13 decimal, and for LF is 10 (and LF seems to be everyone's default).  You may in some other places see these specified in hex, where they'd be expressed as e.g., 0x0D and 0x0A.  And as he also alluded to, in text format they may go by the escape codes of \r and \n.  (Confused yet?)

 

One thing I would suggest, and this runs slightly counter to Crossrulz's final suggestion - VISA allows you to set a single termination character value, but then also allows you to specify both "end mode for read" and "end mode for write" as separate settings, and here I'd suggest you set both modes to "termchar".  If you do this, for reads, the VISA read node will collect chars up to and including the incoming CR as you'd expect. And you will not need to add the termination character to your command strings - VISA will add it for you whenever you pass the string to the VISA Write node.  For most serial protocols, I feel this makes life simpler; you don't need to keep adding the \r encoding to the various command strings you implement, it's specified in one place, at serial configuration.  (Just my opinion and my general practice over the years.)

 

Best of success, and please reply with additional questions (and report your successes!)

 

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
0 Kudos
Message 8 of 8
(574 Views)