07-01-2014 10:43 AM
I need help to send a query (command) to a Lakeshore 331 temp controller in order to read the the zone parameters. From the repsonse, I need to be able to use the numerical data in a function. My initial thought was to use the I/O assistant to send the ZONE? query, but I cannot get it to work properly. This is using a serial 232 connection. Any help is welcome. (I am very new to prgraming so a detailed explaination would be much appreciated). If you have a better idea than using the I/O assistant for this project, please let me know as well. I have been using the Lakeshore 331 Labview drivers but they do not have a zone read function included. The Lakeshore 331's manual is online and its I/O commands are listed in ch. 6 for serial.
Thank You,
Matt
Solved! Go to Solution.
07-01-2014 10:56 AM
07-01-2014 12:53 PM
Like I said, I don't know much about programming, so the command I have been sending is ZONE?. I got that from the manual ( http://www.lakeshore.com/Documents/331_Manual.pdf ) in 6-17. How would you recommend using the visa write/ read?
Thanks,
Matt
07-01-2014 01:10 PM
Well if you read page 6-39 you'll see that the device is confused. you haven't specified which loop or zone to query re-read section 6.3 "<Param> fields are required. so you need something more like "ZONE? 1,1[term]"
Some basics or VISA. reads and writes allways take or return strings and only strings. (It makes a lot of sense if you think about it) Scan from string and format into string are on the string palletts (all sorts of string to number and number to string functions exist.)
07-01-2014 01:13 PM
Would I actually write "[term]" or would I place something else there?
07-01-2014 01:29 PM
The way I understand it is, "ZONE? 1,3[term]." Is there a way to turn the 3 into a variable so that it can be chosen through the UI (or for the computer to automatically cycle through and read every zone and turn it into an array)? I don't want the user to have to change the entire command each time a different zone needs to be read .
07-01-2014 01:43 PM
07-01-2014 01:52 PM
I do not believe that a for loop is going to be able to change a single value inside of a string in the scenario that I had imagined. I am using a for loop to cycle through a csv read, but if I am sending a command (in the form of a string through a VISA write) a single value in the text will not change simply by a for loop when the entire command would have to be in the for loop. I was wandering if there was a way to write something like ZONE? 1,X[term] Where X could be a local variable inside of a for loop to cycle with an increment by 1 function.
07-01-2014 02:36 PM
07-01-2014 02:39 PM