09-11-2014 10:40 PM - edited 09-11-2014 10:46 PM
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.
Solved! Go to Solution.
09-11-2014 10:41 PM
find the attachments
09-11-2014 10:42 PM
just in case labview file doesnt open my images of requierd section of block diag
09-11-2014 10:51 PM
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
09-12-2014 06:50 AM - edited 09-12-2014 06:50 AM
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.
09-12-2014 09:52 AM
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.
crossrulz m using port 18 of my p.c and connecting usb to arduino mega 2560.
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?
09-12-2014 10:00 AM
find the attachment
09-12-2014 10:01 AM
and image
09-12-2014 10:13 AM
@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.
09-12-2014 12:30 PM