LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview with arduino

Solved!
Go to solution

which kind of data are you expecting ASCII or binary????

0 Kudos
Message 41 of 49
(1,250 Views)

i am going to send a string like this :-  "330,360,0" as it is. Be it in ascii but i should be able to get it like that.

0 Kudos
Message 42 of 49
(1,205 Views)

I am attaching the final program, it is working fine but it only reads output when i run the program with the highlight execution button on with no other delay in the program which takes around 23 seconds to complete. But if i try to run it without that button on it is not able to read, only when i set the delay around 10 seconds it is able to read. What could be the possible reason for difference in working in both situations and how can we solve it ?

0 Kudos
Message 43 of 49
(1,180 Views)

I have not gone back through the entire thread but one thing jumps out about your VI. You are configuring for termination characters on both read and write and then you use Bytes at Port on Read. NEVER use Bytes at Port when termination on read is enabled. VISA Read will wait until the termination character arrives. Just set a constant on byte count to a value larger than the longest expected message and it will returns as soon as the  message is complete. A value of 100 might be suitable if the messages are like the "330,360,0" string you posted earlier.

 

What is the reason for a 1 iteration for loop?

 

Lynn

0 Kudos
Message 44 of 49
(1,162 Views)

@johnsold wrote:

I have not gone back through the entire thread.


Lynn , if you go back to the entire thread, number of times we have told the OP not to use bytes at port ( termination character is enabled )

Hope now this time he will take the Knight's word.

Message 45 of 49
(1,156 Views)

Neos,

 

I suspected that he had been told. Since his program still does not work, perhaps he will try what has been recommended!

 

Lynn

0 Kudos
Message 46 of 49
(1,149 Views)

As the others has said, why have you changed your program back with all those bad bad programing?

It has been told multiple times how you should send data from the Arduino and how you should read that data from the serial buffer.

 

And for the Arduino code, you will get trouble there also.

Deactivating and activating the interrupts as fast as the loop() function can run will guarantee that you miss some interrupts.

 

You need to start with a lot more simple program and work from there.

Get the communication to work as simple as possible, one way first, then both ways.

when you have the communication working you can added more to your Arduino code.

 

 

0 Kudos
Message 47 of 49
(1,133 Views)

Hi oathkeeper,

There IS a way you can make a LabVIEW code for the arduino.

You need not write a code in the IDE, but you just need to download LIFA or LINX.

They both are specifically made for the arduino, so you can write your code in the block diagram and run it there itself.

You can download both LIFA & LINX from the VI Package Manager by JKI.

 

Hope that answers your question, please ask if you have any doubts.

0 Kudos
Message 49 of 49
(938 Views)