I have been trying to modify some existing code on an ultra 5000 drive. This drive also communicates to micro1500 LRP. All I'm trying to do is add some code to whenever the drive is in motion, so either in jog or doing a move command, to update the current position. This position will be displayed on a PanelView 600.
So, right now I'm trying to define a global variable (floating point) that gets the update, but I have a feeling that I don't have that setup right. Look at the following code:
#define Servo_Pos 10
How do I specify that 'Servo_Pos' is a floating point variable? I need that to be F8:10, but I feel liking I'm missing something.
Also, maybe its just the code that I want to update. So take a look at this:
FloatArraySetElement(Servo_Pos,AxisGetFeedbackPos());
Would that be correct? Right now I have that line of code in multiple places of the program, like when there is a move command or if its jogging forward/reverse. I'm thinking of putting in code like this:
if(MoveInProgress() || InputGetState(JOG_ENABLE))
{
FloatArraySetElement(Servo_Pos,AxisGetFeedbackPos());
}
That way it would update when either of those are true, but not sure how well that would work.
Any help would be appreciated.
So, right now I'm trying to define a global variable (floating point) that gets the update, but I have a feeling that I don't have that setup right. Look at the following code:
#define Servo_Pos 10
How do I specify that 'Servo_Pos' is a floating point variable? I need that to be F8:10, but I feel liking I'm missing something.
Also, maybe its just the code that I want to update. So take a look at this:
FloatArraySetElement(Servo_Pos,AxisGetFeedbackPos());
Would that be correct? Right now I have that line of code in multiple places of the program, like when there is a move command or if its jogging forward/reverse. I'm thinking of putting in code like this:
if(MoveInProgress() || InputGetState(JOG_ENABLE))
{
FloatArraySetElement(Servo_Pos,AxisGetFeedbackPos());
}
That way it would update when either of those are true, but not sure how well that would work.
Any help would be appreciated.