04-12-2016 03:05 PM
Hi I built a system in Arduino that reads the temperature of a meeting room, and when the temperature goes up (Hot), an IR Transmitter sends a signal to turn on the AC at 17 Celcius , and if it gets cold turns off the AC. So I'm trying to run this project in Labview using LINX, I'm able to read the temperature and I can turn on/off anything with a condition, but I have no idea how can I send the IR signals in LabVIEW.
To caught up the IR signal that turns on the AC, I had to read the signal with an IR reciever, with the help of some codes out there I found that the signal was read as:
Encoding : NEC
Code : 38588B1 (32 bits).........
I used an oscilloscope to read the signal, and I got a bunch of bits "94 bits'
000000000000000000111111111010101010101011101110111010101010111010111011101010101110101010111010111011101010101110
But I didn't really needed this, so my question is how can I send this signal in LabVIEW?
HELP !!! PLEASE, I can share everything I have.
Solved! Go to Solution.
04-12-2016 03:43 PM
How do you plan on connecting your IR transmitter to your PC? I would guess you'd use a digital output on a DAQ card with some other hardware to power the transmitter.
Do you know what the timing intervals are for the 1's and 0's? You could use a DAQ card that has hardware timing for the digital outputs and write a digital waveform out of that pin.
04-12-2016 09:20 PM
Hi Ravensfan,
Well I was planning to keep my Arduino connected to LabVIEW, I used the circuit diagram of the next page:
https://learn.adafruit.com/using-an-infrared-library/sending-ir-codes
I took a looked to DAQ cards but they are a little bit expensive for me. On my Arduino board I am able to select the digital output, I think it can work that way. I don't remember what were the timing intervals of my signal I will take a look tomorrow.
how can I send those bytes in a signal? I saw a lot of different types of Digital Waveform in LabVIEW, I'm not familiar with those functions
04-12-2016 09:47 PM
04-12-2016 10:43 PM
I didn't see you mention the Arduino. But now I see you said Lynx which is a code word for Arduino.
You basically need to do the work on the Arduino for timing and controlling the digital output. That with a bit of code to receive commands from the serial port. And your LabVIEW code will send the serial command. It may be just a matter of sending a string of "1"'s and "0"'s. That or you could back it as bits into bytes and send it as about 12 bytes to send the 94 binary digits.
04-13-2016 04:50 PM
well, I'm a complete noob here, I've been trying the whole morning, but I'm going nowhere, is there anyway you can help me out with some code, my IR signal has intervals of 500 uS, I'm able to send a waveform trough the IR with the "Digital Write Square Wave" Function,, but I can't send the right signal, so I'm really lost with this.
Any suggestion are greatly appreciated.
04-13-2016 05:05 PM
Yeah well, the 500uS interval kinda means you're toast if you want LabView to be the one calling the shots. See, LabView is running in your OS (Windows, OSX, Linux, etc.) that is designed to be used by a human and thus is not deterministic, i.e. timing won't be too accurate, particularly at the uS interval.
You could, however, use a microcontroller with a simple code, that sends the train of pulses depending on input.
04-13-2016 05:38 PM
As the previous poster said, you don't have deterministic programmatic control from LabVIEW (in pretty much any supported platform) - it's expected that there is some hardware-timed lower-level support between your application level code and the actual hardware, if you're trying to generate deterministic edge transitions, or capture pin input at a reasonable sample rate.
Under the other environments, that support may be DAQmx (or DAQmx Base) and some NI hardware. Or perhaps some third-party hardware (like the previously mentioned RedRat), with calls to a third-party-supplied DLL to manage it.
My general impression of LabVIEW executing on an Arduino (which so far is looking over a co-worker's shoulder while he explored), is that native LabVIEW support for the I/O is VERY limited - I think they had static port I/O and maybe I2C and/or SPI support. Someone on here who is more conversant with Arduino can tell you if you can get LabVIEW to call a support library (like IRLib, the library used by the article you linked to). I'd be surprised if the Call Library Function node is supported (yet) on the Arduino target.
Dave
04-13-2016 05:39 PM
04-20-2020 08:01 AM
You can see the samples for Ardunino linux folder and modify it.
C:\Program Files\National Instruments\LabVIEW 2019\examples\MakerHub\LINX.
Regards,