LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview with arduino

Solved!
Go to solution

This is more an Arduino question than a LabVIEw question.

Try to search on google for Arduino Serial Handling or arduino serial protocol

 

Or else post you question on the Arduino forum, there are a lot of people there to help you with Arduino.

0 Kudos
Message 21 of 49
(1,800 Views)

Alright then thank you very much...:)

0 Kudos
Message 22 of 49
(1,782 Views)

Hi, 

I am going to ask you a problem related to labview only not with the arduino programming.

i am trying to write some characters written by me through labview only and read it again through the board to labview and see it whatever is read. But it seems that there are 0 bytes at the port according to what the property node shows.Help me out please, i will attach the labview program.

0 Kudos
Message 23 of 49
(1,739 Views)

Could you attach your Arduino code also.

 

Remember that the best way to transfer data the Arduino to the PC is bey using the Serial.println().

That function sends a "\n" (New line) over the serial.

LabVIEW VISA Read then knows that all data has been transfered when a "\n" is received.

0 Kudos
Message 24 of 49
(1,736 Views)

Actually i am not at all using the arduino code now...i just want to know first of all that whether whatever i m writing is reaching the board. Did u notice that the property node 'bytes at port' says 0 bytes. why ?

Although i m writing something (330.0, 360.0,0) , it should read this and display..

Reagrding the use of labview for serial print, i actually want to use labview as a front panel that's why i am emphasizing on it otherwise i know serial.println is a way to do it and i would have used it in the first place.

 

I even checked it with an example given in labview i.e. Advanced serial read and write, you can find it with the 'find examples' option in help menu, but it still is not working i mean it still shows zero bytes at port.

 

0 Kudos
Message 25 of 49
(1,730 Views)

Actually i am not at all using the arduino code now...i just want to know first of all that whether whatever i m writing is reaching the board


If you are not using arduino code then who is going to send reply to the PC and how will you get to know that command is reaching to board.

 

 Did u notice that the property node 'bytes at port' says 0 bytes. why ?


because you do not have any bytes in recieve buffer.

 

Although i m writing something (330.0, 360.0,0) , it should read this and display.


 

for that you should do loopback test. 

 

Reagrding the use of labview for serial print, i actually want to use labview as a front panel that's why i am emphasizing on it otherwise i know serial.println is a way to do it and i would have used it in the first place.


serial.println is function of arduino IDE. it will send command with termination '\r' and '\n'. and you can read this value in LabVIEW without using bytes at ports.

 

 

 

0 Kudos
Message 26 of 49
(1,710 Views)

How are you testing this ?

Are you not having the Arduino connected with a code runing in it, that is reading and writing back on the serial port ?

 

To have any bytes on the port you need some hardware sending bytes to your PC.

The easiest way is to use your Arduino to read what the PC is sending and send the same thing back on the serial to the PC.

But that requeres that you program your Arduino to do so. That is why I asked for code.

0 Kudos
Message 27 of 49
(1,708 Views)
If you are not using arduino code then who is going to send reply to the PC and how will you get to know that command is reaching to board

The labview is capable of doing that....look at my labview code closely. I will attach the new one now because i solved the problem but still there is some glitch in it that i need to solve.

because you do not have any bytes in recieve buffer.

 actually the process of writing and reading is occuring so fast that neither labview nor arduino is able to realize that actually there are not zero but some bytes are there on port. I have added delay now and now it is able to write and read as well. have a look at the labview code now.

 

0 Kudos
Message 28 of 49
(1,686 Views)
The easiest way is to use your Arduino to read what the PC is sending and send the same thing back on the serial to the PC.

 That is what i am trying to do, and now it is working.PFA and have a look at it.

But that requeres that you program your Arduino to do so. That is why I asked for code.

 It does not need arduino code, it just needs an arduino board, rest is done by labview.

Please look at the code now and now it is working, the reason i have explained in the last post. I need your help to sove the problem which is appering now. Run the program for some time and u will see that the message you writ is not read completely everytime only some part of it displays.

0 Kudos
Message 29 of 49
(1,681 Views)

I think labview is not able to write to arduino i checked my program again after changing the input values and found that its not changing.
Can anyone please help me out here, i think some communication gap is there like may be some settings are not correct, the message we send is not reaching the buffer of arduino.

0 Kudos
Message 30 of 49
(1,663 Views)