LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview visa getting slow when connected to arduino

Solved!
Go to solution

visa in labview when connected to arduino prog gets slow

i have checked it passes the required codde but action is slow

and most important every time to get the o/p i need to stop the prog then start again.

i tried doing a new prog with only one string constant and visa in  singlw while loop thinking this was due to lenghty progs but still things are not working as i want i.e. fast n without stopping the prog. i have attached my files n images of required portion of block diag

i have used a string of lenght 10 char n i my program and just one visa write.

 

0 Kudos
Message 1 of 24
(4,630 Views)

find the attachments

Download All
0 Kudos
Message 2 of 24
(4,629 Views)

just in case labview file doesnt open my images of requierd section of block diag

0 Kudos
Message 3 of 24
(4,619 Views)

What is your requirement? What actually you want to do from arduino?

 

Is only command response operation involve. Can you upload the VI in 2011 so that I can see.

 

Its not possible that VISA is getting slow when arduino connected. Its all about the way your code written

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 24
(4,612 Views)

What serial port hardware are you using?  How are you judging "slow"?

 

How do you know the Arduino just isn't be slow?  You might actually need to add in some waits to your LabVIEW code.  Right now you are just hammering your microcontroller with commands.  If the Arduino can't handle the message rate, you will have a huge backlog of commands that the Arduino has to keep up with.  When you stop your program, you are allowing the Arduino to catch up.


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
Message 5 of 24
(4,582 Views)

Ranjeet_Singh my requirement is to send 10 character srting from visa write to arduino. When i change the controller index and click on my led's which i have designed to transmit my code( only if true) using case selctor the code must reach arduino. It reaches but there is a delay of 2 to 3seconds everytime i send. and next time when i change th index and click the led to send the code it is not passed. when i run the program again it is passed. I have added all my code in a single while loop which runs continously.

I have made a code in arduino for my hardware. when i send codes from arduino my hardware runs successflly.

n yes only command response operation is involved.

regarding 2011 i wont be able to i guess.but i am copy pasting my prog in labview 7.1. except visa everythig is pasted i guess.

i have attached images of my block diagram for further reference.

my harware is: two 8bit DAC, DDS an i.c. which accepts code and generates sinwave, digital potentiometer which accepts code and takes a value between 0 to 10kohm and 12 relays take thier control signal from this code.

i judge labview goes slow because when i dont connect arduino n run the prog the hex code indicator going to visa displays code exactly at the instant when i press led for transmission of code.

as per ur sugesstion  i checked arduino board i found thr transmission and recieve led's are on continously.and as per my labview prog my transmission should actually start only when i click the led.may due to continues transmissiion its getting slow. 

but what can i do then? 

0 Kudos
Message 6 of 24
(4,561 Views)

find the attachment

0 Kudos
Message 7 of 24
(4,553 Views)
0 Kudos
Message 8 of 24
(4,552 Views)

@vanashree wrote:

find the attachment


Why are you building arrays with each iteration of your WHILE loop?

And why are you using Build Array function?  A FOR loop would work for many of the ones I saw in your VI.

0 Kudos
Message 9 of 24
(4,547 Views)
how can i substitute all my arrays with a for loop???can show me with one array?
0 Kudos
Message 10 of 24
(4,531 Views)