04-22-2021 03:45 PM
Hi everyone,
Hoping someone can help with this since I am very new to labview:
I am using a Vi for controlling temperature using "TEMPTRONIC" instrument. This Vi was created by a former research-mate. However, right now I need to be able to save the current temperature readings to a file (.txt, etc).
I have attached the Vi for reference. The program works perfectly for ramping up the temperature on the device, but i see that there is "current temp" indicator , but it's not recording or showing any values.
Thanks in advance for your help!
04-26-2021 08:40 PM
What controller are you using? Generally, a "Set" command will not initiate a response from an instrument. You would have to request the read value. We need more information (ie the instrument you are communicating with) before we can help any more.
04-26-2021 11:42 PM
Hello, thanks for your response. the controller is Temptronic
04-27-2021 01:19 AM - edited 04-27-2021 01:23 AM
Hi mavs,
@mavs123 wrote:
the controller is Temptronic
So you read its manual to learn about the commands and responses of that device?
@mavs123 wrote:
However, right now I need to be able to save the current temperature readings to a file (.txt, etc).
Then you need to implement some file handling in this VI to save your data to a file!
What have you tried? Where are you stuck?
@mavs123 wrote:
This Vi was created by a former research-mate.
You should improve this VI!
- Use a FOR loop instead of a WHILE loop when you know the number of steps/iterations before entering the loop.
- I recommend to use FormatIntoString instead of FloatToString combined with several string constants and ConcatString.
- No need to wire default values to SerialPortInit.
- Don't use BytesAtPort, it's wrong most of the times!
- You should use VISAClose after the loop…
- …
04-27-2021 07:11 AM
@mavs123 wrote:
Hello, thanks for your response. the controller is Temptronic
That's just the name of the company. What is the model of the controller you are using?
04-27-2021 02:19 PM
The model is a CMI-X Series Controller ThermoChuck Systems.
04-28-2021 01:56 AM
Crossrulz, if i understand correctly then what this VI is doing is writing a temperature setpoint and reading a temperature value from controller. The "setp" command has nothing to do with reading.
Regarding data logging, it doesn't seem like you've actually tried anything, but the simplest way is probably Open/create/replace file function (from File I/O tab) at the start of your VI, with Write Text file inside the loop and Close file at the end, outside the loop.