LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration of labview to record measurements from YSI substrate analyzers

Hi,

 

We are using the attached VI to record substrate concentration data from YSI analyzer. We sometimes, once in 10 attempts, are able to record the measurement. However, the VI is never able to update the substrate concentration that is measured every two minutes and throws up communication error.
 
We are using RS232 port on our PC to communicate with the YSI analyzer. Also attached is the image of the COMport settings of the PC and YSI 2700 analyzer (where you can check the desired settings needed to establish communication between YSI analyzer and PC).
 
Is it possible for someone here to comment on any mistake that we might be making in our VI?
 
0 Kudos
Message 1 of 3
(2,237 Views)

Hi ysi,

 

what error do you get exactly?

Also, if the VI you posted is the one you're actually using, I'd assume that you use run continuously. This might be part of a problem, as it will run at max speed and permanently initialize/deinitialize the communication.



Remember Cunningham's Law
0 Kudos
Message 2 of 3
(2,220 Views)

Another echo of @PeterFoerster, with some additional comments --

 

I assume your Top Level Program sets up the YSI Instrument, and then takes readings "periodically" (not specified by you, and unclear from their manual, particularly to a non-biochemist, how it would be used in practice).  But let's assume that you set it up, say "Go", and either take periodic readings (timed) or take "on demand" readings.  Let's further assume that you always want the "latest" reading (the instrument can store readings, but we'll ignore this, for now).

 

You would typically initialize the Instrument, then call a sub-VI to get each reading.  The sub-VI, unlike your routine, would not continually re-initialiize and then close the VISA connection, but simply re-initialize it.  Each time you wanted to make a Reading, you'd send the "Read" command (as you did), Read, Parse, and return the data.

 

A comment on VISA Reads -- your Instrument (and most VISA instruments) sends a Termination Character (/n) after each output it sends back.  When you do a VISA Read, and if you have set VISA to use the Terminaltion Character (which you have, as you've chosen it as the Default), you generally ask it to "Read until you get a Termination Character" (which I do by saying "Read 1024 bytes")(if you want to be more "conservative", ask for 1000 bytes ...).

 

Finally, parse the entire string.  YSI has told you the format, go and use it, it will make your life (and your code) much simpler.  The function Scan From String is your friend -- you tell it the String Format, and it goes to work.Parse YSI.png

 

In this Snippet, the first five Fields are just "field-name placeholders" (YSI appears to use fields without space separators, a good thing).  I put "DEX " in for the sixth field, as that appears to be something you are looking for, and values for the Result, Units, an Error Code (a 4-Hex-digit number) and a back-slash used as a Continuation Character (just to be sure that the backslash would be read).  You can see I only bring out what I want, but if you wanted to add Date, Time, etc., you would just wire to the appropriate terminals.

 

Bob Schor

 

 

 

0 Kudos
Message 3 of 3
(2,214 Views)