04-06-2016 08:07 PM
I tried you code, it can read the exactly what are going on the COM port.
But, I could not see any thing on graph
05-24-2016 04:23 PM
Hi drog, I am using an Arduino to read temperatures using 4 MAX6675 modules. Your VI looks like the one I need... however when I tried to run it... the temperatures are not plotted, I only can see in a window below something like the serial monitor of the arduino displaying the temperatures. I will attach my Arduino code because I think that the probles is in the way I am sending the data through the serial monitor using the "serialprint" command. I will appreciate so much your help.
Best Regards
05-25-2016 08:47 AM
I suspect that the problem is in the text pattern recognition in the VI. It's purpose is to extract the number text and is specific to the Arduino program. In my example:
I am looking for CR/LF, a series of digits, a decimal point, a series of digits, CR/LF and then a capital A. This is specific to the text format from my sample Arduino program.
I suggest reading up on regular expressions, review the text format coming out of your Arduino and changing the text pattern to match. I only used one temp sensor so you will have to alter the code to extract multiple readings. If you don't need the text coming out of the Arduino to be human readable then you could insert control characters at the Arduino end to make temp extraction easier.
Cheers
06-04-2016 10:00 AM
hello drog, i am still working on my project using arduino and labview. i using your TempMon2.vi but i got a problem. the temperature doesnt show on diagram. the temperature only show on concatenated string.
i hope you can reply this, coz i really really need your help.
thanks,
best regards,
Angga
06-04-2016 12:01 PM
Mind showing your code so we can tell you what is wrong with it?
06-05-2016 09:05 AM
hello crossrulz, this is actually not my program, but i tried to use this because i think this can worked since this program for reading temperature just like what i need.
i used max6675 and arduino mega 2560, i already get the code for the arduino. but unfortunately the program only read the temperature form arduino but doesnt show in graph. i hope you can help me.
thanks in advance.
06-05-2016 11:01 AM
What is the string you have in the Concatinated String? I'm thinking we can simplify this quite a bit. If you can supply the Arduino code as well, that could be helpful.
06-05-2016 11:09 AM
i still don't really understand about the concatinated string, i'm still new in labVIEW.
here is the arduino code
#include <max6675.h>
#include <Wire.h>
int thermoSO = 51;
int thermoCS = 49;
int thermoCSK = 47;
MAX6675 thermocouple(thermoCSK,thermoCS,thermoSO);
int vccPin = 53;
int gndPin =45;
void setup() {
Serial.begin(9600);
//use Arduino pins
pinMode(vccPin,OUTPUT);digitalWrite(vccPin,HIGH);
pinMode(gndPin,OUTPUT);digitalWrite(gndPin, LOW);
//Serial.println("MAX6675 test");
//wait for MAX chip to stabilize
delay(500);
}
void loop() {
//basic readout test, just print the current temp
//serial.print("C=");
int temp = thermocouple.readCelsius();
Serial.println(temp);
//Serial.print("F+");
//Serial.println(thermocouple.readFahrenheit());
delay(500);
}
any suggestion sir ?
much appreciate for your help sir.
thanks
06-05-2016 11:43 AM - edited 06-05-2016 11:44 AM
We can simplify this code A LOT with that information.
1. Instead of a graph, use a chart. A chart keeps a history, so you can just wire in your latest value into it.
2. Use the termination character. The Serial.PrintLn sends your data and a Line Feed at the end. VISA can detect that Line Feed and stop the read when it finds it. This alone eliminates most of your code.
3. Since all that is being sent is the temperature, you can just convert staight to a number directly after reading.
06-05-2016 11:58 AM
thanks alot for your help sir, but now i have one more problem.
when i click run there is a window pop up, it said "VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."
what sould i do ? and one more thing, actually i use this program to read temperature and the data that was read is gonna control solid state relay to heater.
previously i use thermistor for reading the temperatur. and now i want to use this thermocouple. since the thermistor that i use in the program that i already made before is in arduino example, can i make the program that you gave to me as a sub Vi that work like the thermistor Vi ?
thanks a lot sir for your kindness,