Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 67081

Send array of numbers through serial port - Write VISA

$
0
0

Hi, I am facing a problem and I have been many hours trying to solve it but no luck. Well first of all, I have implemented a PID on arduino and everything works good. During real time execution, I am being able to send 6 parameters throught the serial monitor(kp,ki,kd,setpoint, MODE, Manual_Control). I am sending it with spaces between each other, for example: 1.2 2.74 0.4 -45 0 0 . Well you can see this in the first image I uploaded. Using that way, everything works fine.

 

Now, my objective is to send those parameters through labview using the serial port. I have researched a lot and finally did my labview program, but it doesnt work. For example, if i send 1.2 2.74 0.4 -45 0 50 (its in manual mode and im sending a 50% to the motor), the arduino receives 100%. This also happens for example if i send 20, 30 etc... Well I have thought that maybe it can´t be sent the way I did it and I need a conversion to another code or something. If you don´t understand something of the code let me know!!

 

I would like to send the parameters only once each time I click a botton. I am not really sure if I have done it the right way too...

 

Well I am uploading the file and pictures of the front panel and block of diagram.

 

I hope someone can help me out to solve this....

Thanks!!


Viewing all articles
Browse latest Browse all 67081

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>