Another basic article. My first time with LabView Real-Time. I decided to write a program to control an R/C servo motor with LV-RT. With PXI-7358, I decided to use the digital I/O, just by turning on and off the port according to the time constraint. I did not read the manual in detail, so I am afraid I missed something, but when I did a test how long the time took for turning the digital port from on to off was around 1.5 ms, and from on to off took 250 uS. It means that it is not possible to drive the R/C servo with digital I/O when the pulse needed should be between 200-2500 uS.
Here’s the code when I did a measurement on the time of digital I/O switching on-off:
I decided to utilize the PWM port. The algorithm is: turning on 100% PWM -> delay X uS -> turn on 0% PWM -> delay 10 ms (minimum), where X is the delay for the position desired, and then the servo could run smoothly.
Here’s the code:
As usual, for documentary (maybe when I am old I could see what I did in my “spare” time -hopefully not wasting my time-), here’s the video:





Matlab?
nice
No, It is LabView
Why is the servo turning all the time if you are giving a constant pwm signal? It should go to the position and keep its position. I think I’m missing a point.
I’m trying to control a RC servo with labview and Digital I/O but it is software timed so I couldn’t get a constant signal. It will be enough if i can at least turn the servo – 90 to 90 degrees and 90 to -90 degrees. Can you suggest anything? Thanks
haiii.
how to control the servo motor , im using PIC16F84A as microcontroller and LabVIEW as a controller the servo motor?
please help me……
do you by chance know how to install labview rt onto desktops?? the ni guides are not very helpful.. and can v interface labview with some other rtos like ecos or qnx??
I read 2yrs ago that it is possible to install RT to a common PC, you can find in NI website for this.