LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DS18B20 Temperature sensor via MyRio

Solved!
Go to solution

Hi!

I tried to use a DS18B20 temperature sensor with a MyRio device via UART port  The sensor data pin is connected to pin 10 A/UART, bat I have Visa read error. Error code: 1073676294. Is it possible to use this like this or do I need something else? Thanks a lot.

0 Kudos
Message 1 of 2
(528 Views)
Solution
Accepted by topic author feristvan

If you search the Web for your Temperature sensor, you'll find lots of discussions about interfacing it with Arduino, noting that the sensor uses a "one-wire" protocol.  Most of the implementations discuss the Arduino interface, noting that two Arduino library functions, "One Wire Library" and "Dallas Temperature.h" are recommended to handle the "one-wire protocol" that this particular chip uses.

 

You will probably need to develop your own library for implementing the one-wire protocol in the myRIO.  Note that the myRIO is perfectly capable of handling communications protocols -- the myRIO Software Toolkit has functions that allow you to communicate with chips that use the SPI or I²C protocol.  You can also "study the Protocol" and then "roll your own" code by utilizing the FPGA.

 

So the answer as to why VISA doesn't work is that you chose a chip that uses a "one-wire" communication protocol.  Learn the protocol, then write a custom communication protocol for this device using the FPGA of the myRIO to handle the timing and the bit processing.  Or get an Arduino.

 

Bob Schor

0 Kudos
Message 2 of 2
(481 Views)