Communication Protocols - Table of Contents - 1. Communication Protocols ....................6 1-1. Communication Functions ....................... 6 1-1-1. Communication Specifications ................6 1-1-2. RS-485 Communication Protocol(Ver6) ..............6 1-1-3. CRC Calculation Example ..................7 1-1-4. Response Frame Structure and Communication Error(Ver6) ......10 1-2....
Page 3
Communication Protocols FAS_IsSlaveExist ........................41 FAS_EnableLog..........................42 FAS_SetLogPath .......................... 43 2-4. Parameter Control Function ....................44 FAS_SaveAllParameters ......................45 FAS_SetParameter ........................47 FAS_GetParamater ........................48 FAS_GetROMParameter ........................ 49 2-5. Servo Control Function ....................... 50 FAS_StepAlarmReset ........................51 2-6. Control I/O Function ......................52 FAS_SetIOInput ..........................
Communication Protocols 2-11. Other Control Function ....................109 FAS_TriggerOutput_RunA ......................110 FAS_TriggerOutput_Status ..................... 111 3. Protocol for PLC Program ..................112 - 5 -...
Communication Protocols 1. Communication Protocols 1- 1. Communication Functions Ezi-STEP Plus-R can control up to 16 axis by Daisy-Chain link at RS-485(two-wire). Pay attention that when Windows goes into standby or power-save mode, serial communication is basically disconnected. When the system is...
Communication Protocols 1) Overview of communication FRAME Sending Frame PC Communication Ezi-STEP Port #n Plus-R Response Frame 2) Basic structure of Frame Frame Data Header Tail 0xAA 0xCC 5~252 bytes 0xAA 0xEE ① 0xAA : Delimited byte ② 0xAA 0xCC: Indicate header of the frame . ③...
Page 9
Communication Protocols for (iBit = 0; iBit <= 7; iBit++) /* If the LSB is 1, shift the CRC and XOR the polynomial mask with the CRC */ // Note - the bit test is performed before the rotation, so can't move the << here if (wCrc &...
Communication Protocols 1-1-4.Response Frame Structure and Communication Error (Ver6) When any command is sent, the basic structure of Frame at the response side is identical. However, there is a difference in case of Frame Data, which ‘communication sta tus’ is added as shown below.
ACII string with NULL byte Slave type status ( strlen() + 1 byes) Slave type : 20 : Ezi-STEP Plus-R ST 60 : Ezi-STEP Plus-R MINI ♦ 1 : Ezi-SERVO Plus-R ST Connected motor type and manufacturer information are required.
Page 12
Communication Protocols Specific parameter values are saved to the RAM. FAS_ SetParameter Sending : 5 bytes 1 byte 4 bytes Parameter number (0~28) Parameter value 0x12 Response : 1 byte (18) 1 byte Communication status 「 」 Refer to 1-2-2.Parameter List Specific parameter values in the RAM are recognized FAS_ GetParameter...
Page 13
Communication Protocols Current input signal status of the control input port is recognized. FAS_ GetIOInput Sending : 0 byte Response : 5 byte 0x22 1 byte 4 bytes (34) Communication status Input status value 「 」 Relevant bit by each input signal, refe r to 1-2-4.
Page 14
Communication Protocols Recognize setting status of I/O and setting value of signal level from FAS_ ROM area. These values are loaded to RAM . IOAssignMapReadROM Sending : 0 byte 0x26 Response : 2 bytes (38) 1 byte 1 byte Command performing status Communication status (0 : complete, values except 0: error) Start/Stop command for ‘Compare Out’...
Page 15
Communication Protocols Reset STEP alarm status or release reset. FAS_ To make a reset, send ‘reset ON’ and ‘reset release’ sequentially. StepAlarmReset Sending : 1 byte 1 byte Reset ON(1) Reset release(0) 0x2C (44) Response : 1 byte 1 byte Communication status To request the Alarm type FAS_...
Page 16
Communication Protocols Request to stop motor currently operates FAS_ MoveStop Sending : 0 byte Response : 1 byte 0x31 1 byte (49) Communication status Request emergency stop of the motor. FAS_ EmergencyStop Sending : 0 byte Response : 1 byte 0x32 1 byte (50)
Page 17
Communication Protocols Request the motor to start limit motion under current setting FAS_ parameter condition MoveToLimit Sending : 5 bytes 4 bytes 1 byte 0x36 Running speed [pps] Running direction (0: -Limit 1: +Limit) (54) Response : 1 byte 1 byte Communication status Request the motor to start jog motion at the current setting parameter FAS_...
Page 18
Communication Protocols Request stop for all motor that connected in same port during FAS_ operation. AllMoveStop Sending : 0 byte 0x3B ( Slave number must be ‘99’) (59) Response : no response (All slaves do not send response because cannot receive response from all slaves simultaneously.) Request emergency stop for all motor that connected in same port FAS_...
Page 19
Communication Protocols 2 bytes 24 bytes Custom Decel. Time Reserved (1~9999) Flag ooption : 0x0001 : reserved 0x0002 : Custom Accel. Time is used. 0x0004 : Custom Decel. Time is used. If the Flag bit is OFF status(0), Accel./Decel. time value is used that saved in controller.
Page 20
Communication Protocols Fulfill Linear Interpolation for multi -drives connected in same port. FAS_MoveLinearAbsPos 「 Position value is abs olute value [pulse] unit and refer to 2. Library 」. for PC Program Fulfill Linear Interpolation for multi -drives connected in same port. FAS_MoveLinearIncPos 「...
Page 21
Communication Protocols Request all data including the current runni ng status FAS_ GetAllStatus (Frame type 0x41, and 0x42 are packed.) Sending : 0 byte Response : 33 byte s 1 byte 4 bytes 4 bytes 4 bytes Communication Input status Output status Status flag...
Page 22
Communication Protocols Request the difference[pulse] between the command position value and FAS_ the actual position value. GetPosError * When external encoder is connected Sending : 0 byte 0x54 Response : 5 bytes (84) 1 byte 4 bytes Communication status Position difference value Request the current running speed value [pps] FAS_ GetActualVel...
Page 23
Communication Protocols To save Position Table values to the RAM of the drive. FAS_ PosTableWriteItem Sending : 66 bytes 2 bytes 64 bytes PT number (0~255) Relevant PT value 0x61 「 」 For items by each PT, refer to 1-2-6. Position Table Item (97) Response : 2 bytes 1 byte...
Page 24
Communication Protocols * Frame Type ‘0x65’~ ‘0x69’, ‘0x0E’~ ‘0x0F’ are assigned for internal use. * PT Number : 0~255 for Ezi-STEP-PR 0~63 for Ezi-STEP-PR-MI - 24 -...
Communication Protocols 1-2-2.Parameter Lists Name Unit Lower Limit Upper Limit Default Pulse per Revolution Axis Max Speed [pps] 500,000 500,000 Axis Start Speed [pps] 35,000 Axis Acc Time [msec] 9,999 Axis Dec Time [msec] 9999 Speed Override Jog Speed [pps] 500,000 5,000 Jog Start Speed...
Communication Protocols 1-2-3.Setup bit of Output pin Here is detail description of ‘0x20’ frame type. This command is only applicable only to 9 signals of ‘User Output 0’ ~ ’User Output 8’ out of 24 signal types in the con trol output port. The rest of 15 output signals cannot be operated by the user ’s disposal.
Communication Protocols 【Example 】 Sending data to turn ON the Pause port 4 bytes 4 bytes (I/O set mask value) (I/O clear mask value) 0x00040000 0x00000000 【Example 】 Sending data to turn OFF the Pause port 4 bytes 4 bytes (I/O set mask value) ( I/O clear mask value) 0x00000000...
Communication Protocols 1-2-6.Position Table Item Refer to ‘motion_define.h’ of include files. Name of Offset Number of Upper Name Structure position Unit Low Limit Bytes Limit Parameter Position lPosition 4 (signed) [pulse] -134217728 +134217728 Low Speed dwStartSpd 4 (unsigned) [pps] 500000 High Speed dwMoveSpd 4 (unsigned)
Library that serviced together with Ezi -STEP Plus-R have to be used. Please refer to 「2. Library for PC Program 」 The second method is sending command ( characters) directly to Ezi-STEP Plus-R. User has to prepare low-level protocol programming like ‘Protocol Test’ program and this method is applied when use higher-level control unit as like PLC.
“\\FASTECH\\ EziMOTION PlusR \\include\\COMM_Define.h” #include “\\FASTECH\\ EziMOTION PlusR \\include\\MOTION_DEFINE.h” #include “\\FASTECH\\ EziMOTION PlusR \\include\\ReturnCodes_Define.h ” Also, library files are as follows: “\\FASTECH\\ EziMOTION PlusR \\include\\EziMotionPlusR.lib” “\\FASTECH\\ EziMOTION PlusR \\include\\EziMotionPlusR.dll” A sample program source of with using these libraries locate at “\\FASTECH\\EziMOTION PlusR...
Library for PC Program (2) The following table indicates return values included commonly in all libraries and these functions offer to check the result (communication status, running status) judged by the drive These functions are available for using library (DLL) and protocol. Returned Item Description...
Page 32
Library for PC Program FMM_INVALID_SLAVE_NUM, Slave number does not exist. Checking the ID value of the drive. (This error cannot be occurred in GUI.) FMC_DISCONNECTED = 5, COM Port is disconnect ed during communication. Checking the communication cable Or Power of the drive. FMC_TIMEOUT_ERROR, There is no response from the drive .
Page 33
Library for PC Program The length of received packet is not correct . Checking the possibility of noise on communication cable. FMP_FRAMETYPEERROR = 0x80, Drive does not recognize the command or wrong command is sent. Checking the command value that you want to send to the drive. FMP_DATAERROR, The value of the sent data is out of the proper range of the drive Checking the value that you want to send to the drive.
Page 34
Library for PC Program (2) Wrong Command FMP_RUNFAIL = 0x85, Fail on motion command : Tried to new motion under following status . -. The motor is already running -. The motor is under stop command -. Try to Z-pulse Origin without external encoder (only for Ezi -STEP) FMP_RESETFAIL, Fail on reset command : Tried to new motion under following status .
Library for PC Program 2- 3. Drive Link Function Function Name Description The drive tries to connect communicatio n with the drive module : FAS_Connect When it is successfully connected, TRUE will be returned. Otherwise, FALSE will be returned. FAS_Close The drive tries to disconnect communication with the drive module.
Library for PC Program FAS_Connect FAS_Connect is the function of connection Ezi-STEP Plus-R. Syntax BOOL FAS_Connect( BYTE nPortNo, DWORD dwBaud Parameters nPortNo Select a serial port number to be connected. dwBaud Input the Baudrate of the serial port. Return Value When it is successfully connected, TRUE will be returned.
Page 37
Library for PC Program // Disconnect. FAS_Close(nPortNo); See Also FAS_Close - 37 -...
Library for PC Program FAS_Close To disconnect the serial port being used Syntax void FAS_Close( BYTE nPortNo Parameters nPortNo Port number to be disconnected Remarks Example Refer to ‘FAS_Connect’ library. See Also FAS_Connect - 38 -...
Library for PC Program FAS_GetSlaveInfo To get the version i nformation string of the relevant drive Syntax int FAS_GetSlaveInfo( BYTE nPortNo, BYTE iSlaveNo, BYTE* pType, LPSTR lpBuff, int nBuffSize Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive pType Type number of relevant drive lpBuff...
Library for PC Program FAS_GetMotorInfo To get the motor information string of the relevant drive Syntax int FAS_GetMotorInfo( BYTE nPortNo, BYTE iSlaveNo, BYTE* pType, LPSTR lpBuff, int nBuffSize Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive pType Type number of relevant motor lpBuff...
Library for PC Program FAS_IsSlaveExist Check connection status of the drive Syntax BOOL FAS_IsSlaveExist( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive Return Value TRUE : The drive is connected. FALSE : The drive is disconnected. Remarks This function is provided from the li brary only and it is inapplicable to the protocol program mode.
Library for PC Program FAS_EnableLog To select the save function of communication error log file. Syntax void FAS_EnableLog(BOOL bEnable); Parameters bEnable Select output of Log. Remarks Select the Log output during Ezi -MOITON Plus-R DLL function used. This setup Do not effect th other process or other program. Log function start from ‘FAS_Connect’...
Library for PC Program FAS_SetLogPath Setup the folder path of Log output files. Syntax BOOL FAS_SetLogPath(LPCTSTR lpPath); Parameters lpPath Folder path Character string of Log output file. Return Value If the folder name is not exist or can not access, return FALSE. Remarks This function have to be called before FAS_Connect library.
Library for PC Program 2- 4. Parameter Control Function Function Name Description Save current status of parameters to the ROM: Even after the drive is powered OFF, parameters related to FAS_SaveAllParameters operating speed, acceleration/deceleration time, and origin return need to be preserved. Save designated parameter to the RAM: FAS_SetParameter Specific parameter is saved.
Library for PC Program FAS_SaveAllParameters Save all edited parameters up to now and assigned I/O signals to the ROM area . Syntax Int FAS_SaveAllParameters( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive Return Value FMM_OK : Command has been successfully performed.
Page 46
Library for PC Program // Change Axis Start Speed parameter as 200 then read it again. nRtn = FAS_SetParameter(nPortNo, iSlaveNo, STEP_AXISSTARTSPEED, 200); _ASSERT(nRtn == FMM_OK); // You have to check if the command di dn't execute correctly. nRtn = FAS_GetParameter(nPortNo, iSlaveNo, STEP_AXISSTARTSPEED, &lParamVal); _ASSERT(nRtn == FMM_OK);...
Library for PC Program FAS_SetParameter Edit the relevant parameter value and then save it to the RAM. Syntax int FAS_SetParameter( BYTE nPortNo, BYTE iSlaveNo, BYTE iParamNo, long lParamValue Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive iParamNo Parameter number to be edited lParamValue...
Library for PC Program FAS_GetParamater To call specific parameter value of the drive Syntax int FAS_GetParameter( BYTE nPortNo, BYTE iSlaveNo, BYTE iParamNo, long* lParamValue Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive iParamNo Parameter number to be brought lParamValue Parameter values Return Value...
Library for PC Program FAS_GetROMParameter To call parameters saved in the ROM Syntax int FAS_GetROMParameter( BYTE nPortNo, BYTE iSlaveNo, BYTE iParamNo, long* lROMParam Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive iParamNo Parameter number to be brought lROMParam Parameter values saved in the ROM Return Value...
Library for PC Program 2- 5. Servo Control Function Function Name Description Release alarm of the drive generated alarm : FAS_StepAlarmReset Troubleshoot root cause of the alarm prior to use this function . FAS_AlarmType Read the Alarm type of the drive. - 50 -...
Library for PC Program FAS_StepAlarmReset To send AlarmReset command Syntax int FAS_StepAlarmReset( BYTE nPortNo, BYTE iSlaveNo BYTE bReset Parameters nPortNo Port number of relevant drive iSlaveNo Slave number of relevant drive bReset Reset command (1: reset, 0:reset release) Return Value FMM_OK : Command has been successfully performed.
Library for PC Program 2- 6. Control I/O Function Function Name Description To set the input signal level of the control inp ut port : FAS_SetIOInput Set input signal [ON] or [OFF] status. To read the current input signal status of the control input port : FAS_GetIOInput The signal status returns by bit for each input signal.
Library for PC Program FAS_SetIOInput To set I/O input. For more information, refer to ‘1-1-5. Frame Type and Data Configuration’. Syntax int FAS_SetIOInput( BYTE nPortNo, BYTE iSlaveNo, DWORD dwIOSetMask, DWORD dwIOCLRMask Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. dwIOSetMask Input bitmask value to be set dwIOCLRMask...
Page 54
Library for PC Program if (dwInput & STEP_IN_BITMASK_USERIN0) // User Input 0 is ON. // Turning ON 'Clear Position' and 'User Input 1' inputs and turning off 'Jog +' input. nRtn FAS_SetIOInput(nPortNo, iSlaveNo, STEP_IN_BITMASK_CLEARPOSITION STEP_IN_BITMASK_USERIN1, STEP_IN_BITMASK_PJOG); _ASSERT(nRtn == FMM_OK); // Check I/O output. nRtn = FAS_GetIOOutput(nPortNo, iSlaveNo, &dwOutput);...
FMM_INVALID_SLAVE_NUM : There is no drive of iSlaveNo in the relevant port . Remarks There are 12 input p ins in Ezi-STEP Plus-R. The user can select and use 9 input pins of them. This function can read the input port status as 32bit.
FMM_INVALID_SLAVE_NUM : There is no drive of iSlaveNo in the relevant port . Remarks There are 10 output pins in Ezi-STEP Plus-R. The user can select and use 9 output p ins of them. When output data is ‘1’, Port A becomes 0V. When it is ‘0’, Port A becomes +5V.
Library for PC Program FAS_GetIOOutput To read I/O output values. For more information, refer to ‘1-1-5. Frame Type and Data Configuration’. Syntax int FAS_GetIOOutput( BYTE nPortNo, BYTE iSlaveNo, DWORD* dwIOOutput Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. dwIOInput Parameter pointer where the output value will be saved .
Library for PC Program FAS_GetIOAssignMap To read I/O Assign Map. For more information, refer to ‘1-1-5. Frame Type and Data Configuration’. Syntax int FAS_GetIOAssignMap( BYTE nPortNo, BYTE iSlaveNo, BYTE iIOPinNo, DWORD* dwIOLogicMask , BYTE* bLevel Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Page 59
Library for PC Program for (i=0; i</*Input Pin Count*/12; i++) nRtn = FAS_GetIOAssignMap(nPortNo, iSlaveNo, i, &dwLogicMask, &bLevel); _ASSERT(nRtn == FMM_OK); if (dwLogicMask != IN_LOGIC_NONE) printf("Input Pin %d : Logic Mask 0x%08X (%s) \n", i, dwLogicMask, ((bLevel == LEVEL_LOW_ACTIVE) ? "Low Active" : "High Active")); else printf("Input Pin %d : Not assigned \n", i);...
Library for PC Program FAS_SetIOAssignMap To set I/O Assign Map. For more information, refer to ‘1-1-5. Frame Type and Data Configuration’. Syntax int FAS_SetIOAssignMap( BYTE nPortNo, BYTE iSlaveNo, BYTE iIOPinNo, DWORD dwIOLogicMask, BYTE bLevel Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program FAS_IOAssignMapReadROM To load the status of CN1 assignment I/O setting status and signal level in ROM area Syntax int FAS_PosTableReadROM( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed.
Library for PC Program 2- 7. Position Control Function Function Name Description FAS_SetCommandPos To set the command position value FAS_SetActualPos To set the current position to the actual position value FAS_GetCommandPos To read the current command position value FAS_GetActualPos To read the current actual position value To read the difference between the actual position value and the FAS_GetPosError command position value...
Library for PC Program FAS_SetCommandPos To set the command position value of the motor Syntax int FAS_SetCommandPos( BYTE nPortNo, BYTE iSlaveNo, long lCmdPos Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lCmdPos Command position value to be set . Return Value FMM_OK : Command has been successfully performed.
Page 64
Library for PC Program FAS_SetActualPos - 64 -...
Library for PC Program FAS_SetActualPos To set the actual position value of the motor Syntax int FAS_SetActualPos( BYTE nPortNo, BYTE iSlaveNo, long lActPos Parameters nPortNo Port number of rele vant drive. iSlaveNo Slave number of relevant drive. lActPos Actual position value to be set. Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_GetCommandPos To read the command position of the current motor Syntax int FAS_GetCommandPos( BYTE nPortNo, BYTE iSlaveNo, long* lCmdPos Parameters nPortNo Port number of rele vant drive iSlaveNo Slave number of relevant drive lCmdPos Parameter pointer where command position value will be saved Return Value FMM_OK : Command has been successfully performed.
Page 67
Library for PC Program FAS_GetActualPos - 67 -...
Library for PC Program FAS_GetActualPos To read the actual position value of the m otor Syntax int FAS_GetActualPos( BYTE nPortNo, BYTE iSlaveNo, long* lActPos Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lActPos Parameter pointer where the actual position value will be saved . Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_GetPosError To read the position error of the motor Syntax int FAS_GetPosError( BYTE nPortNo, BYTE iSlaveNo, long* lPosErr Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lPosErr Parameter pointer where the position error value will be saved Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_GetActualVel To read the actual velocity of the motor Syntax int FAS_GetActualVel( BYTE nPortNo, BYTE iSlaveNo, long* lActVel Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lActVel Parameter pointer where the actual velocity value will be saved Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_ClearPosition To set the command position value and actual position value of the motor to ‘0’ Syntax int FAS_ClearPosition( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of r elevant drive. Return Value FMM_OK : Command has been successfully performed.
Library for PC Program 2- 8. Drive Status Control Function Function Name Description To read control I/O status, running status Flag value : The current input status value, the output setting status FAS_GetIOAxisStatus value, and the running status Flag value will be returned.
Library for PC Program FAS_GetIOAxisStatus To read I/O Input and Output values of the relevant drive, and the motor Axis Status value Syntax int FAS_GetIOAxisStatus( BYTE nPortNo, BYTE iSlaveNo, DWORD* dwInStatus, DWORD* dwOutStatus, DWORD* dwAxisStatus Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program FAS_GetMotionStatus To read the motion status of current motor at one time Syntax int FAS_GetMotionStatus( BYTE nPortNo, BYTE iSlaveNo, long* lCmdPos, long* lActPos, long* lPosErr, long* lActVel, WORD* wPosItemNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program FAS_GetAllStatus To read I/O Input and Output values of the relevant drive, the motor Axis Status, the motor motion status at one time. Syntax int FAS_GetAllStatus( BYTE nPortNo, BYTE iSlaveNo, DWORD* dwInStatus, DWORD* dwOutStatus, DWORD* dwAxisStatus, long* lCmdPos, long* lActPos, long* lPosErr,...
Library for PC Program FAS_GetAxisStatus To read the motor A xis Status value. For status Flag, refer to ‘1-1-5. Frame Type and Data Configuration’. Syntax int FAS_GetAxisStatus( BYTE nPortNo, BYTE iSlaveNo, DWORD* dwAxisStatus Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program 2- 9. Running Control Function Function Name Description FAS_MoveStop Stop the motor in runn ing with deceleration. FAS_EmergencyStop Stop the motor in running immediately without deceleration. FAS_MoveOriginSingleAxis Start operation to return origin. FAS_MoveSingleAxisAbsPos The motor moves as much as the given absolute position value. FAS_MoveSingleAxisIncPos The motor moves as much as the given incremental position value.
Library for PC Program FAS_MoveStop To stop the motor Syntax int FAS_MoveStop( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed. FMM_NOT_OPEN : The drive has not been connected yet . FMM_INVALID_PORT_NUM : There is no nPort in the connected ports .
Library for PC Program FAS_EmergencyStop To stop the motor without deceleration Syntax int FAS_EmergencyStop( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed. FMM_NOT_OPEN : The drive has not been connected yet .
Library for PC Program FAS_MoveOriginSingleAxis To search the origin of system. For more information, refer to ‘User Manual_Text 9.3 Origin Return’. Syntax int FAS_MoveOriginSingleAxis ( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_MoveSingleAxisAbsPos To move the motor to the absolute coordinate value Syntax int FAS_MoveSingleAxisAbsPos ( BYTE nPortNo, BYTE iSlaveNo, long lAbsPos, DWORD lVelocity Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lAbsPos Absolute coordinate where position to move lVelocity Velocity when the motor moves...
Page 82
Library for PC Program FAS_StepAlarmReset(nPortNo, iSlaveNo); // Check input status. nRtn = FAS_GetIOInput(nPortNo, iSlaveNo, &dwInput); _ASSERT(nRtn == FMM_OK); if (dwInput & (STEP_IN_LOGIC_STOP | STEP_IN_LOGIC_PAUSE | STEP_IN_LOGIC_ESTOP)) FAS_SetIOInput(nPortNo, iSlaveNo, STEP_IN_LOGIC_STOP STEP_IN_LOGIC_PAUSE | STEP_IN_LOGIC_ESTOP); // Increase the motor to 15000 pulse. lIncPos = 15000; lVelocity = 30000;...
Library for PC Program FAS_MoveSingleAxisIncPos To move the motor to the incremental coordinate value Syntax int FAS_MoveSingleAxisIncPos ( BYTE nPortNo, BYTE iSlaveNo, long lIncPos, DWORD lVelocity Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lIncPos Incremental coordinate where position to move lVelocity Velocity when the motor moves...
Library for PC Program FAS_MoveToLimit To give the motor a command to search the limit sensor Syntax int FAS_MoveToLimit( BYTE nPortNo, BYTE iSlaveNo, DWORD lVelocity, int iLimitDir Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lVelocity Velocity when the motor moves iLimitDir...
Library for PC Program FAS_MoveVelocity To move the motor to the relevant directi on and velocity. This function is available for Jog motion. Syntax int FAS_MoveVelocity( BYTE nPortNo, BYTE iSlaveNo, DWORD lVelocity, int iVelDir Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program FAS_PositionAbsOverride To change the absolute position value set while the motor moves to the absolute position Syntax int FAS_PositionAbsOverride( BYTE nPortNo, BYTE iSlaveNo, long lOverridePos Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lOverridePos Absolute coordinate pos ition value to be changed Return Value...
Page 87
Library for PC Program 3) If the changed target position is set to the closer coordinate than the original target position, the motor move to the changed target position. Speed Time Position Override↑ Example Refer to ‘FAS_MoveSingleAxisAbsPos ’ library. See Also FAS_PositionIncOv erride - 87 -...
Library for PC Program FAS_PositionIncOverride To change the incremental position value set while the motor moves to the incremental position Syntax int FAS_PositionIncOverride( BYTE nPortNo, BYTE iSlaveNo, long lOverridePos Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lOverridePos Incremental coordinate position value to be changed Return Value...
Library for PC Program FAS_VelocityOverride To change the velocity set while the motor moves Syntax int FAS_VelocityOverride( BYTE nPortNo, BYTE iSlaveNo, DWORD lVelocity Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lVelocity Velocity to be changed in [pps] Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_AllMoveStop To stop all motors that connected in same port. Syntax int FAS_AllMoveStop( BYTE nPortNo Parameters nPortNo Port number of relevant drive. Return Value No response Remarks Example Refer to ‘FAS_MoveSingleAxisAb sPos’ library. See Also - 90 -...
Library for PC Program FAS_AllEmergencyStop To stop all motors that connected in same port without deceleration Syntax int FAS_AllEmergencyStop( BYTE nPortNo Parameters nPortNo Port number of relevant drive. Return Value No response Remarks This function does not include deceleration phase. So, the user must be careful so that the machine cannot be impacted.
Library for PC Program FAS_AllMoveOriginSingleAxis To search the origin of system for all motor those are connected in same port . For more information, refer to ‘User Manual_Text 9.3 Origin Return ’. Syntax int FAS_AllMoveOriginSingleAxis ( BYTE nPortNo Parameters nPortNo Port number of relevant drive.
Library for PC Program FAS_AllMoveSingleAxisAbsPos To move all motors that connected in same port to the absolute coordinate Syntax int FAS_AllMoveSingleAxisAbsPos ( BYTE nPortNo, long lAbsPos, DWORD lVelocity Parameters nPortNo Port number of relevant drive. lAbsPos Absolute coordinate of position to move lVelocity Velocity when the motor moves Return Value...
Library for PC Program FAS_AllMoveSingleAxisIncPos To move all motors that connected in same port to the incremental coordinate value Syntax int FAS_AllMoveSingleAxisIncPos ( BYTE nPortNo, long lIncPos, DWORD lVelocity Parameters nPortNo Port number of relevant drive. lIncPos Incremental coordinate of position to move lVelocity Velocity when the motor moves Return Value...
Library for PC Program FAS_MoveSingleAxisA bsPosEx To move the motor to the absolute coordinate Syntax int FAS_MoveSingleAxisAbsPos ( BYTE nPortNo, BYTE iSlaveNo, long lAbsPos, DWORD lVelocity, MOTION_OPTION_EX* lpExOption Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lAbsPos Absolute coordinate of position to move lVelocity...
Page 96
Library for PC Program opt.flagOption.BIT_USE_CUSTOMACCEL = 1; opt.flagOption.BIT_USE_CUSTOMDECEL = 1; opt.wCustomAccelTime = 50; opt.wCustomDecelTime = 200; nRtn = FAS_MoveSingleAxisIncPosEx(nPortNo, iSlaveNo, lIncPos, lVelocity, &opt); _ASSERT(nRtn == FMM_OK); // Waiting until motioning is done. Sleep(1); nRtn = FAS_GetAxisStatus(nPortNo, iSlaveNo, &dwAxisStatus); _ASSERT(nRtn == FMM_OK); stAxisStatus.dwValue = dwAxisStatus;...
Library for PC Program FAS_MoveSingleAxisIncPosEx To move the motor to the Incremental coordinate Syntax int FAS_MoveSingleAxisIncPos( BYTE nPortNo, BYTE iSlaveNo, long lIncPos, DWORD lVelocity, MOTION_OPTION_EX* lpExOption Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. lIncPos Incremental coordinate of position to move lVelocity Velocity when the motor moves...
Library for PC Program FAS_MoveVelocityEx To move the motor to the relevant direction and velocity. This function is also available for Jog motion. Syntax int FAS_MoveSingleAxisIncPos( BYTE nPortNo, BYTE iSlaveNo, DWORD lVelocity, int iVelDir, VELOCITY_OPTION_EX* lpExOption Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Page 99
Library for PC Program nRtn = FAS_MoveVelocityEx(nPortNo, iSlaveNo, lVelocity, DIR_INC, &opt); _ASSERT(nRtn == FMM_OK); Sleep(5000); FAS_MoveStop(nPortNo, iSlaveNo); See Also - 99 -...
Library for PC Program 2- 10. Position Table Control Function Function Name Description FAS_PosTableReadItem To read items of RAM area in the specific position table FAS_PosTableWriteItem To save specific position table to RAM area To save all of position table values to ROM area : FAS_PosTableWrite ROM Total 256 PT values are saved.
Library for PC Program FAS_PosTableReadItem To read a specific item in the position table Syntax int FAS_PosTableReadItem( BYTE nPortNo, BYTE iSlaveNo, WORD wItemNo, LPITEM_NODE lpItem Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. wItemNo Item number to be read lpItem Item structure pointer where item value is saved Return Value...
Page 102
Library for PC Program nodeItem.wContinuous = 1; // Next command should be connected without deceleration. nRtn = FAS_PosTableWriteItem(nPortNo, iSlaveNo, wItemNo, &nodeItem); _ASSERT(nRtn == FMM_OK); // Call the value in the ROM regardless of edited p osition table data. nRtn = FAS_PosTableReadROM(nPortNo, iSlaveNo); _ASSERT(nRtn == FMM_OK);...
Library for PC Program FAS_PosTableWriteItem To edit specific items in the p osition table Syntax int FAS_PosIableWriteItem( BYTE nPortNo, BYTE iSlaveNo, WORD wItemNo, LPITEM_NODE lpItem Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. wItemNo Item number to be edited lpItem Item structure pointer to be edited Return Value...
Library for PC Program FAS_PosTableWrite ROM To save all current position table items to ROM area Syntax int FAS_PosTableWriteROM( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed. FMM_NOT_OPEN : The drive has not been connected yet .
Library for PC Program FAS_PosTableRead ROM To read position table items b eing saved in ROM area Syntax int FAS_PosTableReadROM( BYTE nPortNo, BYTE iSlaveNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. Return Value FMM_OK : Command has been successfully performed. FMM_NOT_OPEN : The drive has not been connected yet .
Library for PC Program FAS_PosTableRunItem To perform command from a specific item in the position table Syntax int FAS_PosTableRunItem( BYTE nPortNo, BYTE iSlaveNo, WORD wItemNo Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. wItemNo Item number to start motion Return Value FMM_OK : Command has been successfully performed.
Library for PC Program FAS_PosTableReadOneItem To read specific item in the specific position table Syntax int FAS_PosTableReadOneItem( BYTE nPortNo, BYTE iSlaveNo, WORD wItemNo, WORD wOffset, long* lPosItemVal Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. wItemNo Item number to be read wOffset...
Library for PC Program FAS_PosTableWrite OneItem To edit specific item in the specific position table Syntax int FAS_PosIableWriteOneItem( BYTE nPortNo, BYTE iSlaveNo, WORD wItemNo, WORD wOffset, long lPosItemVal Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. wItemNo Item number to be edited wOffset...
Library for PC Program 2- 11. Other Control Function Function Name Description To Start/Stop command for ‘Compare Out’ signal FAS_TriggerOutput_RunA To check if the trigger output pulse is working or not. FAS_TriggerOutput_Status - 109 -...
Library for PC Program FAS_TriggerOutput_RunA To start/stop the digital output signal(Compare Out pin) when reaching the specific Taregt position. Syntax int FAS_TriggerOutput_RunA( BYTE nPortNo, BYTE iSlaveNo, BOOL bStartTrigger, long lStartPos, DWORD dwPeriod, DWORD dwPulseTime, Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive.
Library for PC Program FAS_TriggerOutput_Status To check if the trigger output is working or not. Syntax int FAS_TrggerOutput_Status( BYTE nPortNo, BYTE iSlaveNo, BYTE* bTriggerStatus Parameters nPortNo Port number of relevant drive. iSlaveNo Slave number of relevant drive. bTriggerStatus Current status of signal output . Return Value FMM_OK : Command has been normally performed.
User Program(GUI) installed folder. Next test procedure will help you to understand the protocol programming. (1)Servo ON/OFF command purpose of command * In case of Ezi-STEP Plus-R : Jump to next step( ‘(2)Motion Command’), because the motor is ready to move status after Power ON.
Page 113
For protocol programming in PLC, you have to add the function of ‘Byte stuffing’ and ‘CRC’ calculation. For ‘Byte stuffing’ refer to ‘1-1-2. RS-485 Communication Protocol ’ and for ‘CRC’ refer ‘1-1-3. CRC Calculation Example ’ on UserManual(Ezi-STEP Plus-R)_Communication Function. - 113 -...
Page 114
Protocol for PLC Program ⓒ Copyright 2008 FASTECH Co.,Ltd. All Rights Reserved. June 20, 2013 rev.08.05.028 - 114 -...
Need help?
Do you have a question about the Ezi-Step Plus-R and is the answer not in the manual?
Questions and answers