LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino and Dallas DS1820 (one-wire)

Solved!
Go to solution

Line 608 in your firmware is sending unnecessary bytes that LabVIEW is not expecting.  It needs to be removed.

Line 608:

Serial.print(temp);

0 Kudos
Message 111 of 172
(2,396 Views)

Thank you but this wasn't the cause. Mhhhh.......

0 Kudos
Message 112 of 172
(2,396 Views)

Did you manage to solve your poblem with 5003 error?

I've got 1 sensor working but when I'm trying to add second, I'm getting errors.

My config is Arduino Mega with LIFA_Base and LabVIEWInterface from this topic.

My case 35: (only change is ".getTempCByIndex(0);)

case 0x35:  // OneWire Read
  sensors.requestTemperatures();  //Send the command to get the temepratures

  //Get temp in degrees farenheit by index (there are other ways available to do this)
  temp = sensors.getTempCByIndex(0);
   tempInt = (long)(temp * 1000.0);  // tempInt must be declared as a long

   // Write all four bytes to serial, MSB first
   Serial.write((tempInt >> 24) & 0xFF);
   Serial.write((tempInt >> 16) & 0xFF);
   Serial.write((tempInt >>  😎 & 0xFF);
   Serial.write(tempInt & 0xFF);

  break;
0 Kudos
Message 113 of 172
(2,396 Views)

Can anyone check what is wrong with my project? I tried to merge something reasonable with all this posts but I get nothing - only "undefined reference to on wire functions". Which is weird, 8 pages of posts and not even one working solution?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 114 of 172
(2,396 Views)

I was able to get it to compile with the latest version of the OneWire library.

  •     Delete the OneWire.h that you have (make a backup just in case).
  •     Download the latest version here.
  •     Import the library into the Arduino IDE.
  •     If you have your LIFA_Base sketch open, close it
  •     Open your LIFA_Base sketch.
  •     Compile.

Some other notes:

It is highly recommended that you do not use any command number that is already in use (such as the LCD one that you removed).  Choose a new number, something like 0xE1 so that it is much less likely that an update would use the number.

About sending it back to LabVIEW, you need to avoid using Serial.print().  This can cause strange thing to happen as other in this thread have experienced.  I would send Tc_100 back to LabVIEW and then convert it further in LabVIEW.

       // Write all two bytes to serial, MSB first

       Serial.write((Tc_100 >>  😎 & 0xFF);

       Serial.write(Tc_100 & 0xFF);

For LabVIEW, it would essentially be the same as in Post #64.  But remember to make sure that your code works with the sensor when used on the Arduino alone.

0 Kudos
Message 115 of 172
(2,396 Views)

Ok, Can I ask for a complete solution from A to Z for working example for reading DS18B20 in LabVIEW through Arduino (LIFA)? ZIP file (with complete firmware, LabVIEW example and recommended connection) will be good Let us treat this as a christmas gift.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Message 116 of 172
(2,396 Views)

I would if I could but I can't.  I don't have any of these sensors.

0 Kudos
Message 117 of 172
(2,396 Views)

Hello!

I read " MAX NUMBER OF DS18B20 SENSORS IS 11 -- MAX NUMBER OF BYTES Tx = 32;" is it truly?

Now I hooked three sensors and got to work correctly, but I need to use about 20-30 sensors. This automation project heating and cooling my house, I'll use solid fuel boiler, Vakkumnye solar collectors, and The passive cooling.

Sensors I read at the addresses previously know and labeled probes.

Now I got LED control at the desired temperature setpoint.

Control signal will control valves heating zones, also mixi valves supplying water to the circuit.

And one more question, How to make a mask to display the degrees after the comma?

Thank you!

With best wishes from Ukraine!...

0 Kudos
Message 118 of 172
(2,396 Views)

Hello, help me please, i downloaded files from post 104 and created scheme from photo, all working. to supplement i want to control relays 220V with arduino and labview and compose additional scheme. but my arduino mega restarting each second and measure temperature. Led of 13 pin flashes.  and relays clickingБезымянный.jpg

0 Kudos
Message 119 of 172
(2,396 Views)

I use serial.

Download All
0 Kudos
Message 120 of 172
(2,396 Views)