10-28-2013 04:23 PM
Hi ,
I have attached my basic code . I want to run the code for 2 sets of numeric control values with a delay in between and loop it. Something like this
abc
Initialize P1=10; P2=20;P3=30;P4=40
Run the code
delay = 10ms
Update P1=150; P2=200;P3=350;P4=500
Run the code
jump to abc
I am stuck how to update the values of P1,P2,P3,P4 ? I thought of using a array function but couldn't go further .
Thanks for the help,
Ana
Solved! Go to Solution.
10-29-2013 08:15 AM
Hello Ana,
One way you could achieve what you are looking for is by using property nodes. These Property nodes will allow you to change control values from the block diagram. You could set up a case structure inside of your while loop that will change the control value via property nodes after a certain number of iterations. Here is a community example that shows how to use property nodes to change boolean controls:
https://decibel.ni.com/content/docs/DOC-22669
-Erik S
10-29-2013 12:24 PM
Hi Erik,
Thanks for your reply. I am trying to use the property node -> value. I am still not sure how to write values to it. Would you be having some simple example for me ?
Thanks,
Sahana
10-29-2013 02:27 PM
Please correct me. I am still stuck.
10-29-2013 06:52 PM
Got it working 🙂
12-02-2013 04:21 PM
Hi,
I am not sure what is the best method to update numeric control P1, P2 , P3, P4 multiple times? I have used property nodes when I had only few values to send. How can I send 4*50 array.
I am using Dynamixel MX 64 servos in my project. I have 4 of them tied in series. P1,P2,P3, P4 represents degree rotation of each servo/axis. Trying to pass multiple set of values to these variables.
Really appreciate your help!
Thanks,
Sahana
12-03-2013 03:24 PM
Hi Sahana,
Instead of using Property Nodes here, you may want to simply index the array of values with a for loop. Here is a Community Example that explains this functionality a bit further:
https://decibel.ni.com/content/docs/DOC-20828
-Erik S
12-05-2013 11:44 AM
Thanks Erik !