02-16-2014 08:01 PM
hi.
i would like to read 2 temperature sensors from a smartech uti (PT100`s) i have compiled a code and have got it to work with a serial connection. but i would like to combine this with the LIFA base so that i can make the other wiring and controls by the arduino interface and palette. is there any way to implement the code to the LIFA base ? im not that experienced in code so im quite lost.
grateful for all help and advice
02-16-2014 10:24 PM
Could you translate the variables, comments, and output into English? It will make understanding the code much much easier and therefore easier to implement in LIFA.
02-16-2014 11:08 PM
Il convert it a little later. Just finished nightshift:)
02-17-2014 10:07 PM
Hi
I do not want to interfere in the thread, but what we want labveiw to do is to show two
calculated values.
Serial.print (Temp1); / / Receive "d"
Serial.print ("\ n");
Serial.print (Temp2); / / Receive "f"
Serial.print ("\ n");
Temp1 and Temp2 and show the values in labv in two different fields. The rest of the code is just a calculation of temperature, and is done in the Arduinon. The values will be between 00.00 to 100.00 degrees.
Slatten
02-17-2014 10:40 PM
Slatten,
You need to create a custom LIFA function (requires both modification in the firmware and a new function in LabVIEW). You can start by duplicating an existing function and go from there. Another tip, never use the print function when making custom functions. You should sent the number back to LabVIEW as an integer and then convert it to the relevant value in LabVIEW.
If you have further issues with this, please start another discussion so that this particular discussion can remain on the original topic.
Thanks and Good Luck.
02-17-2014 10:48 PM
HI
Sorry if I was a bit fuzzy, but the code I sent over is from the original code.
I and pz212 is working together on this project. That I / we want is that the
Arduinon do most of the calculations, and use labveiw to be a GUI.
Slatten
02-17-2014 10:55 PM
Ok, thanks for clearing that up.
Generally, it is important to understand the whole code (i.e. I need to understand the code) to integrate it into LIFA. If you are not using LIFA and are simply using LabVIEW as a display only (there are no commands being sent to Arduino from LabVIEW) then you can create a serial terminal listener. You would need to have the Arduino send out the data to the serial port in a standardized fashion where LabVIEW would read it and parse all the data from the resulting Serial string.
So, the first critical question is whether you are using LIFA (the VI package you install via VIPM) or are using LabVIEW as a listener only (as described above).
02-17-2014 11:01 PM
hi
Yes I use lifa. As a starter I want to have labv as a gui but at a later stage some functions are to be controlled from labveiw. But the way I want it is that the arduinon should do most of the job.
Slatten
02-17-2014 11:23 PM
Ok. So, to be able to integrate it into LIFA, you need to tell me about the context. When is the code being executed? Can we simply grab temperatures (run the code from above which was removed) when LabVIEW requests it? If no, then it might get more complicated. Having some context will really help if you are not sure how to answer.
02-17-2014 11:29 PM
hi
I'm sorry about the little information you've received. I will clean arduino code during the day and enter help text in English.
Will also include an outline of how I intended it to work.
Slatten