03-03-2020 10:49 AM
we are looking to send a signal from a daq to a Arduino to program lights and sounds to turn on and off based the signal.
03-03-2020 11:01 AM
What is "a daq"? Is it a specific NI device?
An arduino can run some basic code. It also has some inputs and outputs of its own.
Do you have a PC in this scenario anywhere?
Draw up a sketch has to how the "daq", the Arduino, and the signals all interact with each other and if there is anything else such as a PC involved.
Right now your question is too vague to know how to answer it.
03-03-2020 11:22 AM
The DAQ is a NI USB 6221
We are trying to figure out how to wire the DAQ to the Arduino to send a signal that the Arduino can use. We currently have LabVIEW gathering data and we need to send that data or signal to the Arduino.
03-03-2020 11:45 AM
What kind of signal? Why do you even need the DAQ? You could send the data over the serial interface on the Arduino using VISA commands.
03-03-2020 02:54 PM
@schoolk13 wrote:
The DAQ is a NI USB 6221
We are trying to figure out how to wire the DAQ to the Arduino to send a signal that the Arduino can use. We currently have LabVIEW gathering data and we need to send that data or signal to the Arduino.
As crossrulz was eluding to, we need you to take a step back and tell us what exactly you are trying to do.
Having an Arduino light LED's based on conditions is easy to do...
You said you have LabVIEW collecting data already. Are you stuck on the part where you test the data and light the LED's based on the data?
Also you do know that an Arduino is basically a DAQ too
Not only that but the NI USB 6221 has digital outputs that can be used to light LED's
So using a DAQ and Arduino in one project seems kind of redundant...
03-05-2020 12:43 PM
1) Yes, I realize an Arduino can be used as a DAQ however from a quick google search Arduino can only sample around 125kSa/s which isn't fast enough for our needs. That is why we are using the two separate systems.
2) I'm using the DAQ to collect high-frequency signals from a sensor, again to reiterate the Arduino doesn't sample fast enough to get the information I need. From that signal, I extract the max voltage output. Using that value, I want to send it to the Arduino to light up some led strips.
03-05-2020 12:51 PM - edited 03-05-2020 12:52 PM
Okay so you are stuck on the part about testing the data and lighting LED's based on the data?
On the Arduino itself, are you using LINX or the Arduino's native language?
03-06-2020 06:16 AM
@schoolk13 wrote:
Using that value, I want to send it to the Arduino to light up some led strips.
Then come up with some kind of protocol for sending the value to the Arduino over the serial connection. On the LabVIEW side, you use VISA functions to send/receive messages. I am not familiar with Arduino code, so I am not going to make any statements there. But if this is all you are sending, then I would use Format Into String with a format string of "%f\n" and then VISA Write to send that value as an ASCII string to the Arduino. Then the Arduino just has to read the line of data sent to it (the \n adds the Line Feed character that the Arduino can use as a termination character), reinterpret the data into a number, and then make decisions on it.
03-10-2020 11:57 AM
arduinos native language
03-10-2020 02:54 PM - edited 03-10-2020 02:54 PM
@schoolk13 wrote:
arduinos native language
Well here's what I would do:
Since you are using the Arduino native language on the Arduino, communicating with the Arduino is no different than communicating with any other instrument on a serial port. In fact is is easier because you are in full control of the serial protocol and command structure.