LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial integers transmission

 

The idea of the programm is this, i do not know how to interact with arduino 

0 Kudos
Message 11 of 16
(846 Views)

1. Make your life a little easier and just have the knob go from 0 to 5.  That avoids this whole 12-bit mess.

2. Use a Format Into String to build up a string with an End Of Line at the end.  You can then just send this string to the Arduino.  The Aruino then just has to read a line from the serial port and it has the value.

NOTE: I am just showing how to format the string and use VISA Write.  You still need to put this inside of a loop, setup the serial port, and close the serial port when done.


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 12 of 16
(837 Views)

Judging by the PM you sent me, you don't know how to program an Arduino.  Well this is not really an Arduino support forum but in a nutshell you just need the Arduino to send its raw analog value over the serial port to that LabVIEW program you wrote, or you can do the math in the Arduino and have it send the actual voltage value.

 

Using Arduino Analog Input

https://www.arduino.cc/en/Tutorial/AnalogInput

 

Using Arduino serial 

https://www.arduino.cc/en/reference/serial

 

Now if you don't want to learn the Arduino programming language I suggest you look at LINX. (LabVIEW for Arduino).

https://www.labviewmakerhub.com/doku.php?id=libraries:linx:start

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 13 of 16
(819 Views)

@lucabasile wrote:

the output must be a numeric indicator, if i understand what you mean


No, it is not clear at all!

 

An indicator displays a received numeric value, while a control lets the operator set a numeric value. In your first post, you talk about "... i have to do a serial-integer transmission ..." but you never told us the direction.

 

From the sentence above, it seem like you want to transmit the value from the Arduino to the LabVIEW program (and show it in an indicator), but from other posts, it seems that you want to transmit from the LabVIEW program to the Arduino (and set it with a control). These are two completely different problems, so which one is it?

 

There are millions of ways to transmit 12 bit and all you need to do is ensure that the two sides agree on the communication format. You have not shown us any hints what that would be.

 

Our answers typically cannot be better that the question, so the first thing that needs to be done is increase the quality of your question. Show us your entire code! Tell us what toolkit you are using! What is running on the Arduino? How is the hardware connected? What happens with the 12 bits?

0 Kudos
Message 14 of 16
(802 Views)

i know you are right  but im not pratical with this.. however i have to transmit from the labview to the arduino

0 Kudos
Message 15 of 16
(789 Views)

@lucabasile wrote:

i know you are right  but im not pratical with this.. however i have to transmit from the labview to the arduino


Have you even considered LINX?

https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:start

 

The "Sparkfun Inventors Kit" Is just an Arduino clone. 

https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:sparkfun_inventors_kit

 

Here is a tutorial that leads you through using the Arduino analog input and LabVIEW 

https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:sparkfun_inventors_kit:po...

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 16 of 16
(787 Views)