取消
显示结果 
搜索替代 
您的意思是: 

How to Control Servo Motor With Array Values Over Serial Communication

Hi all,

 

I'm stuck on a project in which I need to use an array to control the back-and-forth movement of two Servo motors. The array is creating a circular area of values. I already have the array but I have absolutely no clue on how to use it to command the two motors in this fashion.

 

The issue here being that the servos require a 'distance command' (e.g. FL 20000, where FL = Feed to Length command and 20000 = the number of steps that the motor takes) and I'm unsure of how to do this for more than one linear movement. Could anybody suggest where to begin with this?

0 项奖励
1 条消息(共 5 条)
1,802 次查看

It would be better if you posted what you have attempted so far.

 

That way it shows that you have tried instead of waiting for someone to hand you the answer.

0 项奖励
2 条消息(共 5 条)
1,783 次查看

Hi onl,

 


@CNLSN wrote:

Could anybody suggest where to begin with this?


When you want to process an array of values one after the other you should use an autoindexing loop...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
3 条消息(共 5 条)
1,772 次查看

@psuedonym here you go. The files are saved as a 2012 version.

 

There are obviously other issues at play here but the motor integration is my current concern.

0 项奖励
4 条消息(共 5 条)
1,765 次查看

@GerdW



When you want to process an array of values one after the other you should use an autoindexing loop...


I'm still too new to LabVIEW to know what an autoindexing loop is without looking it up... I believe (I could be completely wrong) that the For loop that I'm using here  to create the shape is already autoindexing. Am I wrong? Would that help in relation to commanding the motors?

0 项奖励
5 条消息(共 5 条)
1,759 次查看