Preface X-NET introduction X-NET protocol stack which is developed by XINJE Company committed to the automation production network. X-NET supports different physical media and networks. X_NET refers to OSI seven layers network protocol, it defines the service and function of each layer and make the network more efficient and simple.
1-1. Function summarize 1-1-1. Introduction X-NET fieldbus is used between XD series PLC or XD series PLC and TG/TN series HMI. The filebus has the advantages of intelligence and digitize, the max speed can up to 3M. It can work through RS485 and OC (optical fiber) for long distance and high speed communication. It has faster speed and better stability than Modbus protocol.
Page 5
Connection method 1: Terminal A is RS485+, terminal B is RS485-. Connnect A to A, B to B. Note: RS485 port can communication through Modbus_RTU or X-NET. Please choose the mode in XINJEConfig software. As the communication effect of RS485 port on the PLC is not better than BD board, it is not recommended to use PLC RS485 port for X-NET communication.
Note: the ED board is in developing. When TBN runs on OC, the station connection wire is optical fiber. The last station sending terminal connects to the receiving terminal of the first station to make the loop network. The optical signal has strong anti-interference ability. But the optical fiber is easy to broken and complicated to make the pigtail, this limits the developing of optical fiber.
Page 7
Choose the com port connected PLC, device type is PLC. If the communication between PLC and PC is error, there will show below error. Please restart the software and configure again. Click ok to back to main window. Then click config/single deivce/com port.
Page 8
As the PLC RS485 port is serial port2, here we choose no.2 for comportNo. The protocol is X-NET. The physical layer is RS485. NetID: the network number of the two PLC. The device net ID in the same network must be the same.
Page 9
Click “write config”, it will show read success window. Click ok to back to the main window. Cut off the PLC power and power on again to make the setting effective. Then click config/single device/route. It shows the Form_RouteTb1 window. Click “read”, it shows read success.
Click ok, the Form_RouteTb1 window shows the subnet routing. The subnet ID is the same to the netID. The communication port is the PLC physical terminal, RS485 port number is 2. Gateway address: the default setting is 0. Click “write”, it will show write success. Then click ok. Please cut off the PLC power and power on again to make the setting effective.
For example: The target device is coil X, the target object type is K1 The target device is coil Y, the target object type is K2 The target device is coil M, the target object type is K3 The target device is coil HM, the target object type is K8 The target device is register D, the target object type is K128 The target device is register HD, the target object type is K136 4.
1-3) Target object address (refer to 32 bits constant or double words register chapter 1-3) Access object numbers 16 bits constant or single word register Local object address Local register 3. Suitable soft component Word Operand System Constant Module K /H ●...
Target object address (refer to 32 bits constant or double words register chapter 1-3) Access object numbers 16 bits constant or single word register Local object address Local register 3. Suitable soft component Word Operand System Constant Module K /H ●...
Page 23
Choose the com port connected PLC, device type is PLC. Click ok to back to main window. Then click config/single deivce/com port. As the PLC expansion XD-RS485-BD port is serial port 4, here we choose no.4 for comportNo. The protocol is X-NET. The physical layer is RS485.
Page 24
NetID: the network number of the two PLC. The device net ID in the same network must be the same. Here we set it to 1. StationID: each PLC station number in the network. The two PLC station number is 1 and 2. Net type: it is PLC communication, please choose TBN.
Page 25
It shows the Form_RouteTb1 window. Click “read”, it shows read success. Click ok, the Form_RouteTb1 window shows the subnet routing.
The subnet ID is the same to the netID. The communication port is the PLC physical terminal, RS485 port number is 4. Gateway address: the default setting is 0. Click “write”, it will show write success. Then click ok. Please cut off the PLC power and power on again to make the setting effective.
Page 27
405: memory error (FLASH erasing) SD151 X-Net communication result 0: correct 1: communication overtime 2: memory error 3: receive CRC error SD152 Free format communication 0: correct send result 410: free format send buffer overflow SD153 Free format communication 0: correct receive result 100: receive error 101: receive overtime...
Page 28
SD169 Serial SD170~SD179 port 3 Serial SD180~SD189 port 4 Serial SD190~SD199 port 5...
2 X-NET motion fieldbus 2-1. Function summary XDC series PLC has one channel motion fieldbus, can connect 20 axes at most, 2 axes pulse output. It can perform incremental position motion control, absolute position motion control, multi-segment motion control for single axis, synchronous motion control for multi-axis. Some instructions can real-time modify the target position and motion speed.
Note: 1. The PLC can control 10 axes servo drives at the same time. 2. PLC COM4 communication parameters keep default value. If it needs to change, please use XINJEConfig software to set the parameters. The configureation method please refer to appendix 1.
Page 31
position, speed. Incremental position motion [MOTO] 16-bit 32-bit MOTO instruction instruction Execution Rising edge or falling edge Suitable condition model Hardware Software 2. operand Operand Function Type Target position 32-bit integer Speed 32-bit integer Acceleration and deceleration time 32-bit integer Axis no.
Page 32
incremental position based on the original position, this value will be the target position. ● when it is running, to modify the value in register(SD2030+60*(N-1))can real-time change the absolute target position. The instruction will move to the modified target position then stop. For example: the target position is 1000, it runs to position 600.
Page 33
Address Definition Remark SM2000+20*(N-1) Servo enable flag ON: servo enable state SM2001+20*(N-1) Running flag ON: the pulse is outputting SM2004+20*(N-1) Axis error flag ON: error Application The motor present position is 2000, it needs to use MOTO to run 10000 pulses with the speed 5000Hz.
Page 34
The present position is 2000, it needs 8000 pulse numbers to get the target position of 10000 pulse numbers in incremental mode. ◆the program in incremental mode DMOV K8000 DMOV K5000 DMOV MOTO DMOV K20000 SD2030 DMOV K6000 SD2032 SM2001 When SM2 is ON, send the pulse numbers, speed, acceleration deceleration time to the related registers.
2-2-2.Absolute position motion [MOTOA] 1. Instruction summarize This instruction runs with absolute position, it can real-time modify the target position and speed when it is running. Absolute position motion [MOTOA] 16-bit 32-bit MOTOA Execution Rising edge/falling edge of the coil Suitable condition model...
Page 36
S3: axis no. N, N is from 1 to 10. ● absolute position, the distance from zero point to target position. For example, the present position is 100, the absolute position is 300, the motor needs 200 pulses to the target position. ●...
Page 37
Set speed S1 the speed and position did not Target position S0 change Deceleration time Acceleration time S2 Changed speed Set speed S1 Changed absolute position target position and speed changed: Acceleration time S2 ◆ motor running distance in absolute position mode The present position is 2000, it needs 10000 pulse numbers to reach target position 10000 in absolute position mode.
DMOV K10000 DMOV K5000 DMOV MOTOA DMOV K20000 SD2030 DMOV K6000 SD2032 SM2001 SM2 is initial ON coil, it sends the pulse numbers, speed and acceleration, deceleration time in the related registers. Servo drive is enable, M0 is from OFF to ON, it run the absolute position instruction MOTOA. M1 is from OFF to ON, it sends the absolute target position in the related register, M2 is from OFF to ON, it sends the new speed in the related register.
Page 39
3. suitable soft component word operand System constant Module K /H ● ● ● *Note: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM. DS includes DS, DHS. M includes M, HM, SM; S includes S, HS; T includes T, HT; C includes C Function and action ●...
Page 42
DMOV K10000 DMOV K5000 DMOV K26000 HD10 DMOV K1000 HD12 DMOV K-20000 HD20 DMOV K7500 HD22 DMOV K25000 HD30 DMOV K4000 HD32 DMOV HD100 DMOV HD102 DMOV HD104 DMOV HD106 MOTOS HD100 DMOV K6000 SD2032 SM2001 PLC start running, when the coil SM2 is ON, the pulse numbers, speed, motion mode, segment number, acceleration/deceleration time will be stored in related registers.
Page 43
Present Segment no.1 positive position/pulse Segment no.2 positive pulse pulse Segment no.3 negative pulse Segment no.4 positive pulse the present position is 5000, in absolute position mode, the first segment sends 5000 pulses, the motor goes to the position of 10000 pulses; the second segment sends 16000 pulses, the motor goes to the position of 26000 pulses;...
Page 44
DMOV K10000 DMOV K5000 DMOV K26000 HD10 DMOV K1000 HD12 DMOV K-20000 HD20 DMOV K7500 HD22 DMOV K25000 HD30 DMOV K4000 HD32 DMOV HD100 DMOV HD102 DMOV HD104 DMOV HD106 MOTOS HD100 DMOV K6000 SD2032 SM2001 PLC start running, when the coil SM2 is ON, the pulse numbers, speed, motion mode, segment number, acceleration/deceleration time will be stored in related registers.
2-2-4.Stop running [MOSTOP] 1. Instruction summary This instruction can stop multi-mode motion. Stop running [MOSTOP] 16-bit 32-bit MOSTOP Execution Rising/falling edge Suitable condition model Hardware Software 2. Operand Operand Function Type Stop mode or deceleration distance 32-bit integer Axis no. 16-bit constant 3.
Page 46
Note: stop running immediately, it may has mechanical damage. ◆slow stop (K0): When S0 is K0: decelerate as the time (SD2036+60*(N-1)), decelerate to stop. ◆fixed-length stop (positive value): S0 is positive value: slow stop, deceleration distance S is set to positive value. (1) If S is less than min deceleration distance Smin (calculate from deceleration time SD2036+60*(N-1)), forward decelerate to stop, then reverse run the distance S.
S < S S = S S > S MOSTOP 2-2-5.Continue running [MOGOON] 1. Instruction summary If the motor stop running, it can make it continue running to the target position. Continue running [MOGOON] 16-bit 32-bit MOGOON Execution Rising/falling edge Suitable condition model...
● When M0 is from OFF to ON, axis S will continue running. S: axis no. N, the range of N is from 1 to 10. ● Work with MOSTOP, to perform pause function. 2-2-6.Synchronous run [MOSYN] 1. Instruction summary The master axis and slave axis (or high speed count) will synchronous run.
Page 49
synchronous. S0: synchronous motion speed times (floating number), which is master and slave axis speed. S1: master axis no.N, the range of N is from 1 to 10. S2: slave axis no.N, the range of N is from 1 to 10. ●...
Page 50
Application Bundle the master axis no.1 motor and slave axis no.4 motor with MOSYN instruction, the slave axis will follow the master axis with the speed 5000Hz and run 10000 pulses. The acceleration and deceleration tiem is 50ms. The slave axis speed is 0.5 times of master axis. The ladder chart: DMOV K10000...
2-2-8.Write in present position [MOWRITE] 1. Instruction summarize This instruction can modify the motion axis present absolute position. It is used to correct the position. Write in present position [MOWRITE] 16-bit 32-bit MOWRITE Execution Rising / falling edge Suitable condition model Hardware Software...
Page 53
(HSD108+20*(N-1)) will change. ● when the motor enabled, it can clear the parameters in table 1 and 2. ● there are four methods to change the present position: ① return to origin through (SM2014+20*(N-1)), (SM2015+20*(N-1)), the present position will change. ②...
2-2-9.Read present position [MOREAD] 1. Intruction summarize This instruction can read the present absolute position. Read present position [MOREAD] 16-bit 32-bit MOREAD Execution Rising/falling edge Suitable condition model Hardware Software 2. Operand Operand Function Type Read present position 32-bit integer Axis number 16-bit constant 3.
3 Teaching function 3-1. SFD register setting The teaching function parameters can be set in SFD registers. The value of SFD can be written in by ladder chart or diagram block programming software. (1) Write in by free monitor or HMI, the register definition please refer to table 4-1. (2) The steps of setting by function block a.
Page 56
d. click the setting icon to open the setting panel: Click write in PLC after setting.
3-2.Return the origin It no needs to make program for X-NET fieldbus returning the origin, please just set the close signal (SFD3036+60*(N-1)), origin signal (SFD3037+60*(N-1)), high speed of returning the origin VH(SFD3040+60*(N-1)), low speed of returning the origin VL(SFD3042+60*(N-1)), creeping speed (SFD3044+60*(N-1)). When the servo enable signal is ON, the returning the origin operation can be done through positive returning origin coil (SM2014+20*(N-1)) and reverse returning origin coil (SM2015+20*(N-1)).
Page 58
with creeping speed, search the servo encoder Z phase in forward direction after stop SFD3040 Return speed 32-bit Pulse/ +60*(N-1) integer second SFD3042 Return speed 32-bit Pulse/ +60*(N-1) integer second SFD3044 Creeping 32-bit Pulse/ +60*(N-1) speed integer second The two modes of return origin point: 1.
Page 59
when touched rising edge of origin signal. Return the origin in forward direction, no close signal: If the origin signal is long: origin Limit If the origin signal is short: origin limit Motion description: the motor returned origin with VH speed, it touched the rising edge of origin signal and the speed become 0 and returned origin in reverse direction with creeping speed, it touched the falling edge of origin signal and stop returning.
Page 60
Close origin limit point Creeping speed If the origin signal is short: Close origin limit point Motion description: the motor returned origin with speed VH, it touched close signal and the speed become VL and continued returning origin, it touched rising edge of origin signal and the speed become 0 and returned origin in reverse direction with creeping speed, it stop returning when touching the falling edge of origin signal.
Page 61
origin limit Creeping speed Motion description: the motor returned origin with VH speed, it touched falling edge of origin signal and the speed become 0, it returned origin in reverse direction with creeping speed, it searched Z phase signal when touching the rising edge of origin signal, it stop returning when found the Z phase signal.
Page 62
Return origin in forward direction, no close signal: origin limit motion description: the motor returned origin with VH speed, it touched rising edge of origin signal and the speed become 0, then it returned origin in reverse direction with creeping speed, it searched servo Z phase signal when it touched falling edge of origin signal, it stop moving after found the Z phase signal.
Page 63
If the origin signal is short: Close limit origin point motion description: the motor returned origin with VH speed, it touched close signal and the speed become VL and continued returning, the speed become 0 when it touched rising edge of origin signal and returned origin in reverse direction with creeping speed, it searched servo Z phase signal when it touched falling edge of origin signal, it stop moving when it found the Z phase signal.
3-3.Jogging X-NET filedbus has jogging function. Set the pulses of jog for one time in register (SD2040+60*(N-1)), set the jogging speed in register (SD2042+60*(N-1)). The forward jogging is triggered by the coil (SM2011+20*(N-1)), the reverse jogging is triggered by the coil (SM2012+20*(N-1)). The jogging signal SM2011+60*(N-1), SM2012+60*(N-1) will be reset immediately after set on.
Page 65
Method 2 Set ON the jogging coil once by timer 100ms. No.1 motor forward or reverse jogging run at 1500Hz. The program: Forward jogging GROUP SM2011 SM2011 SM2011 K100 SM2011 GROUPE Reverse jogging GROUP SM2012 SM2012 SM2012 K100 SM2012 GROUPE Note: Set the motor step length SD2040 to 1500, jogging frequency SD2042 to 1500Hz in motor enable state.
Page 66
M2: reverse jogging. Press M2 on the HMI screen, the motor will reverse jogging run at 1500Hz. Release the M2 button, the motor will stop running. Address Definition Type Unit Initial Note value SFD3024+ Jogging step 32-bit Pulse 1000 60*(N-1) length initial integer...
Page 67
The jogging step length, accelerate time, decelerate time, forward jogging, reverse jogging can be set on the axis 1 control panel 4. click the setting icon to open the setting panel The jogging step length, speed, step length initial value, speed initial value can be set on the panel.
3-4.In-circuit emulation First install the BD board in PLC COM4, then set ON SM2018+20*N (N is axis no.). Now the PLC is in in-circuit emulation mode. It can simulate the PLC running without connecting the servo system. The parameters and state feedback will be calculated inside the PLC and be consistent to the state of connecting the servo system.
4 System coil and register When XDC series PLC connect to fieldbus servo system, the default can connect 10-axis, the max can connect up to 20-axis. The parameters of 10-axis and 20-axis are different. PLC parameters please refer to the following table, the servo parameters should be changed at the same time. Address Definition 1 axis to 10-axis...
Page 70
limit produce alarm code 20001(max soft limit over the range) when the present position is larger than this value SFD3018 Max speed 32-bit Pulse 500000 Can be determined by the +60*(N-1) limit integer number motor encoder precision. It will /second run at max limit speed if the speed is over the max limit speed.
Page 71
terminal positive logic is 0, negative logic is -30000. SFD3036 Close signal 16-bit 0xFF Set the X terminal no., 0xFF is +60*(N-1) terminal integer no terminal, negative number means negative logic. Note: X0 positive logic is 0, negative logic is -30000. SFD3037 Origin 16-bit...
Page 72
negative, motor reverse. 1: negative logic, command speed is positive, the motor reverse, command speed is negative, the motor run forward. SFD3048 Positioning 32-bit Pulse The PLC will have positioning +60*(N-1) finished integer number finished signal in this width width initial range, it no needs to get the value signal after the positioning...
Page 73
60*(N-1) time setting integer SD2038+ Synchronized 32-bit Tracking axis speed/ be tracked axis speed 60*(N-1) motion speed integer ratio SD2040+ Jogging step 32-bit Pulse 60*(N-1) length integer number SD2042+ Jogging speed 32-bit Pulse 60*(N-1) integer number /second SD2044+ Positioning 32-bit Pulse The threshold to judge the positioning finished, 60*(N-1)
limit status or max position limit is effective Table 4-6: control bit parameters (N=1~20) Address Definition Note SM2010+20*(N-1) Servo enable ON: servo enable; OFF: servo disable SM2011+20*(N-1) Forward jogging System will automatical reset after enable SM2012+20*(N-1) Reverse jogging System will automatical reset after enable SM2013+20*(N-1) Clear servo...
Page 75
overrange flag and code by manual 20005 Over speed Decelerate Decrease the instruction target SD2002+ Error alarm stop speed 60*(N-1) message 20006 Position offset Urgent stop, the servo parameter P0-05 must be (double alarm shut off the 0. Check if the machine stalled words) enable and offset of position instruction...
Page 76
overrange 20024 Reserved 20025 Bound axis no. Motion Check the bound axis no. of the overrange instruction instruction execution invalid 20026 The input point Cannnot Check the input terminal settings returning back to zero for returning zero, including close zero terminal terminal and origin terminal overrange...
Use XINJEConfig Please connect PLC with PC through USB cable before using XINJE config. USB cable can work after the driver is installed which will be installed together with the XINJE config. 1. Open the XINJE config, it will show the following window:...
Page 78
Select the com port on your PC, the device type is PLC, then click confirm. If it shows the following error, please restart the software and do it again until it connected the device successfully. 4. Click ok to return the main window, click config-Singledevice-Comport. 5.
Page 79
6. As the PLC RS485 BD board is serial port 4, here please set the comport to 4. The net type is X-NET. The PHY please set to RS485. NetID: the network number of all the devices must be consistant in the same network. The network number can be set to any value.
8. Click confirm, restart the PLC again to make the configuration effective. Note: (1) When the device is changed, please configure again. (2) Please run the XINJE config as administrator for the PC system higher than win7. (3) Please close the antivirus software when using the XINJEconfig. Appendix 2 Servo parameters It needs to set the servo drive parameters before debugging the program.
Page 81
P7-07 Instruction refresh period (unit: us) 3000 6000 …… The Z phase numbers in returning origin mode. If it is 0, search the first Z P7-20 phase; if it is negative value, search the reverse direction Z phase Note: (1) *: 1 stop bit, even parity, baud rate is 3Mbps. (2) Sampling time and slave station space time are set to character.
Page 82
无锡信捷电气股份有限公司 WUXI XINJE ELECTRIC CO., LTD. 江苏省无锡市蠡园开发区滴翠路 100 号 4th Floor Building 7,Originality Industry park, Liyuan 创意产业园 7 号楼四楼 Development Zone, Wuxi City, Jiangsu Province 邮编: 214072 214072 电话: (0510) 85134136 Tel: (510) 85134136 传真: (0510) 85111290 Fax: (510) 85111290...