LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send signal for Arduino to read from DAQ

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.

0 Kudos
Message 1 of 10
(3,222 Views)

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.

0 Kudos
Message 2 of 10
(3,208 Views)

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. 

0 Kudos
Message 3 of 10
(3,193 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(3,184 Views)

@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...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 10
(3,160 Views)

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.

0 Kudos
Message 6 of 10
(3,098 Views)

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?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 10
(3,095 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(3,070 Views)

arduinos native language 

0 Kudos
Message 9 of 10
(3,032 Views)

@schoolk13 wrote:

arduinos native language 


Well here's what I would do:

  1. Use LabVIEW and the DAQ to make measurements and determine how many LED's to light
  2. Also using LabVIEW and VISA send that number of LED's to light to the Arduino
  3. The Arduino program would simply light the number of LED's that it receives.

 

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.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 10 of 10
(3,023 Views)