Levent1970

Positioning with FX5U and FX5-40SSC

10 posts in this topic

Hi Friends.

I need some Help with Positioning. I'm using the FX5U PLC and the FX5-40SSC "Simple" Motion Controller with Servo MR-JE-20B and Servo Motor HG-KN23K which is controlling a Linear Guide.

The JOG Modus is Working, Home Position is Working too, but I cant Programm a Position where the Motor have to Drive. I hope someone can Help.

Part of My Program looks like:

 

FX5SSC_1.stsysctrl_d.bPLC_Ready_D:=TRUE;

FX5SSC_1.stSysMntr2_D.bReady_D:=TRUE;

M_Ax1_PLC_Ready:=TRUE;
M_Ax2_PLC_Ready:=TRUE;
M_Ax3_PLC_Ready:=TRUE;

IF FX5SSC_1.stSysMntr2_D.bReady_D THEN

    FX5SSC_1.stSysCtrl_D.bAllAxisServoOn_D:=TRUE;
    
END_IF;

IF M_Ax2_Error_Reset THEN
    
    MOV( bEnable OR PLC_1st_scan , K0 , K4M700 );
    M_FX5SSC_OperateError_Ax2 (i_bEN:= TRUE ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2    ,i_bErrReset:= M_Ax2_Error_Reset ,o_bModuleErr=> bEnable ,o_uModuleErrId=> D_Ax2_Operate_Error);
    
END_IF;

IF P_Achse_HomeDrive THEN
    
    M_FX5SSC_StartPositioning_Ax2(i_bEN:= P_Achse_HomeDrive ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_uStartNo:= 9001 ,
    o_bOK=> bEnable1 ,o_bErr=> bEnable2);
    
    RST( bEnable1 OR bEnable2 , P_Achse_HomeDrive );

    P_Achse_Referenziert:=TRUE;
    RST( TRUE , Referenzfahrt_TP_Ein_Aus ); 
    RST( TRUE , Fehleranzeige_P_Achse_nicht_Ref );
    
END_IF;
 

SpeicherP1:= REAL_TO_INT (Startposition_TP_P_Achse);

M_FX5SSC_SetPositioningData_Ax2(i_bEN:= Beginne_FahrtP ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_uDataNo:= 1);
M_FX5SSC_StartPositioning_Ax2(i_bEN:= Beginne_FahrtP ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_uStartNo:= 1); 
M_FX5SSC_ChangeSpeed_Ax2(i_bEN:= Beginne_FahrtP ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_udSpeedChangeValue:= 100);
M_FX5SSC_ChangePosition_Ax2(i_bEN:= Beginne_FahrtP ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_dTargetNewPosition:= REAL_TO_DINT(Startposition_TP_P_Achse) ,i_udTargetNewSpeed:= INT_TO_DWORD(Fahrgeschwindigkeit_TP_P_Achse)); 
    
IF StartPAxis THEN
    
    FX5SSC_1.stnAxCtrl1_D[1].dTargetNewPosition_D:=REAL_TO_DINT(Endposition_TP_P_Achse);
    FX5SSC_1.stnAxCtrl2_D[1].uPositioningStart_D:=1;
    
END_IF;

Share this post


Link to post
Share on other sites

What do yo mean exactly when you say you can't program a position ? You can't define a position or drive to a position ?

When it doesn't wotk do you get an error ?

If you are more familiar with PLC OPEN there are FB's available. 

p.s. I saw this piece of code :    MOV( bEnable OR PLC_1st_scan , K0 , K4M700 );

You should try not to use hard addressing and replace the K4M700 with an array instead 

Capture.JPG

Share this post


Link to post
Share on other sites

Thanks Gambit, I started to use the FB s from Mitsubishi, I'm not so Familar with the MC FB, I found out how i can send my Axis to the Position, my problem is, i cant do it again. I have to restart the PLC to drive it once time to this position.

DMOV( TRUE , INT_TO_DINT(Sollgeschwindigkeit_TP_P_Achse) , U1\G7104 );        //Startposition Geschwindigkeit
DMOV( TRUE , INT_TO_DINT(Sollgeschwindigkeit_TP_P_Achse) , U1\G7114 );        //Endposition Geschwindigkeit
DMOV( TRUE , INT_TO_DINT(Sollgeschwindigkeit_TP_P_Achse) , U1\G7084 );        //Parkposition Geschwindigkeit
DMOV( TRUE , REAL_TO_DINT(Parkposition_TP_P_Achse /1.3103) , U1\G7086 );
DMOV( TRUE , REAL_TO_DINT(Startposition_TP_P_Achse/1.3103) , U1\G7106 );
DMOV( TRUE , REAL_TO_DINT(Endposition_TP_P_Achse/1.3103) , U1\G7116 );

M_FX5SSC_StartPositioning_Ax2(i_bEN:= Schweissen_ein OR Taster_Schweissen_Ein AND P_Achse_Referenziert ,i_stModule:= FX5SSC_1 ,i_uAxis:= 2 ,i_uStartNo:= 11 ,o_bOK=> StartPosition_OK ); 

Achse2_InPosition:=U1\G2517.F;
Achse2_InArbeit:=U1\G31501.1;

pos.JPG

Share this post


Link to post
Share on other sites

Should be an issue with your enable. Why not change to a some bt which isn't in your program. and try if that works.
(i_bEN:= Schweissen_ein OR Taster_Schweissen_Ein AND P_Achse_Referenziert  )

If it doesn't do you get an error at the second attempt ?

Share this post


Link to post
Share on other sites

OK it Works, it was a Bit by Initializing :) How can i set a 3rd Position like a "Parkposition" in my List? Its only a Position, which my Axis drives after Start to there and if its done with the Oscillation between Start and Endposition (List Pos. 11 and 12) it drives again to my Parkposition.

Edited by Levent1970

Share this post


Link to post
Share on other sites

Just set Positioning data #12 as CONT.

Set Positioning data #13 as END, ABS and positioning address for parking the Axis.

Share this post


Link to post
Share on other sites

Hi Levent1970, can you share me where you can download " FB s from Mitsubishi ", i can't find example from mitsubishi.

Edited by Ninza T

Share this post


Link to post
Share on other sites
4 hours ago, Ninza T said:

Hi Levent1970, can you share me where you can download " FB s from Mitsubishi ", i can't find example from mitsubishi.

They should appear when you add  FX5-40SSC to Module Configuration.. I'm using FB-language and have these in Element Selection -> Module:elements.thumb.jpg.024a8f61cbd138b20a97c

Share this post


Link to post
Share on other sites

Actually he's using the MC.... PLC open FB instead of the Mitsubishi ones but they are both good.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now