01-31-2008 09:49 AM
01-31-2008 11:07 AM
01-31-2008 11:43 AM
02-04-2008 07:34 AM
12-06-2014 12:01 PM
Hi,
Thank you for your driver.
I could use it to read temperature from temperature controller.
I also modified it to set the temperature setpoint and try to control the temperature, but
failed.
Attached please find my modified code.
I will appreciate it If you could figure it out for me.
Thank you,
Guoguang
Qian
12-06-2014 03:25 PM
Appending to a six-year-old thread is often not the best way to get good responses.
It also helps if you provide specific information about what failed. Did the computer go up in smoke? Did the setpoint change but to an incorrect value? what errors, if any, occurred? The most recent VI posted in this thread was for a pH meter, not a temperature controller. What is the manufacturer and model of your temperature controller?
What is the communications protocol? When you write to the device you send messages starting with STX and ending with carriage return. One note states that the return message starts with STX. Does it terminate with carriage return? If so, enable termination characters, set x0D as the termination character and remove Bytes at Port and the Wait. Can the device accept successive commands as fast as they can be sent or does it need time to rspond to one command before the next is sent?
Lynn
12-06-2014 06:22 PM
After looking at your VI, I noticed mention of DigiSense 89000. I found the manual on the ColePalmer website.
The communication protocol is fairly well documented. The device sends three kinds of messages: one byte <ACK> or <NAK> and multi-byte <STX> ... <CR><LF>. Your VI does not implement the protocol very well. The device is also set up for XON/XOFF handshaking although it is probably not necessary to use it.
The commands you send may be part of the problem as well: Set Mode (to value entered by user), Set to Cool, Set to Autotune, Set Power up mode, Set Setpoint (to value entered by user). Inside loop: Request current Process Variable value, Read, repeat. After the loop, eXit remote mode. Problems: It will not control or return data while in autotune Control Run status. You may need to autotune when you first set up the system but the run status should probably be 1 or 2. Also, when reading the PV, values may include OPEN, OVER, or UNDER. Your VI does not check for these.
I would set it up to read the <ACK>/<NAK> response after each command before writing the next command. Make sure the correct commands are being sent. Use an enum for the Mode input from the user so the user cannot enter invalid modes. In the loop I would read one character after the write and test it for <ACK>,<NAK>, or <STX>. When the first character is <STX> then read the rest of the message with <LF> as termination character. Check the message for OPEN, OVER, or UNDER before scanning the numeric part.
Lynn
12-06-2014 08:59 PM
Hi Lynn,
Thank you so much for your reply.
Sorry for not writing the problem clearly.
Let me rewrite it below:
The purpose of the code is to set setpoint of temperature controller then read
the temperature in a while loop. When temperature reading reachs the setpoint
within 0.5 C while loop stops and then code exit.
When I run the code It could set the setpoint and read temperature. But the heater
didn't turn on even temperature reading is below the setpoint. My modification is based
on my understanding of the manual. I probably missed or misunderstood something in
the manual. it will be great If you could give some clue about how to turn on the heater.
My temperature is Model 89000-10.
Thanks again,
Guoguang
12-07-2014 11:39 AM
Guoguang,
I do not have the time to study the entire manual to see what needs to be done. In general the best way to start something like this is to operate the temperature controller manually. Write down every button you press or every setting you change while running it by hand. Then write the code to do the same things programmatically.
Some instruments may have complex settings which interact in ways that might seem strange to someone not accustomed to the terminology used by the manuals or the details of how the intrument works.
As I pointed out in my previous post I wonder about the autotune and cooling settings.
Lynn
12-07-2014 07:04 PM
Lynn,
Thank you for your help.
I will try the way you mentioned this week. I will let you know the result.
Thanks,
Guoguang