About Zmotion FAQ
There shows some common problems and corresponding solutions.
Mainly about Zmotion Motion Controller Usage.
Please check here at first, if after that, it still exists, contact us.
Notes:
*Many questions can be checked by Zmotion Debugging Software: RTSys / ZDevelop, download them at first, and read the software user manual*
(RTSys: https://www.zmotionglobal.com/pro_info_282.html)
(ZDevelop: https://www.zmotionglobal.com/pro_info_167.html)
*For commands & codes, please refer to Programming Manuals*
(Programming Manuals: like Basic, Vision, PC, HMI, etc.: https://www.zmotionglobal.com/download_list_17.html)
*When you get one controller, please read its user manual at first*
Local register LV: a local workable register in a function. every function, each of its running real case uses different data, and has 8 LV, the number is 0-7. This register is a 32-bit floating-point. It is similar to ZBASIC’s LOCAL, when BASIC calls ZPLC, called parameters are automatically passed into the LV register. Meanwhile, LV memory can be also as the modifier register.
Program function introduction:
When power is on, start two subtasks in BASIC program, and separately call PLC’s two subfunctions, SUB_CAL and SUB_CAL1. They will be the return value by passing the local register LV1, but because LV is the local register, means each function has its own 8 LV registers. Therefore, when X0 is switched on, a and b, the two variables are assigned the value of 3 and 4 respectively. Also, due to the LV local register can be as the modifier register, so the value of DT2 is 3, the value of DT3 is 4.
Programming example:
It can be determined according to the ID of modules, and ID is determined by the combination value of DIP switches, similar to the group of 8421.
For all DIP switches OFF of ZIO1608, ID0 - input 16-31. Output 16-23
The first DIP switch is ON, and other dip switches are OFF. ID1 - Input 32-47. Output 32-39.
DIP1, 2 are ON, others are OFF. ID3 –Input 64 – 79, Output 64-71.
And so on.
1. Transfer the motion commands, axes no any reaction.
Situation1: Limit bit or alarm input, or level configuration for limit alarm is incorrect.
The special signal default is commonly closed, but some domestic production is often opened. Set INVERT_IN to flip the corresponding opening over.
Situation2: The atype of the axis is incorrectly configured.
2. Indicate an unknown label.
Situation1: There is no statement on variable before use.
Situation2: Character typing errors in labels.
3. After using “MPOS=” assignment for modifying coordinates, there are errors in coordinates.
DPOS is the virtual location, MPOS is the feedback location, so for virtual axes, MPOS = DPOS.
When modifying MPOS, if the movement doesn’t stop completely, there will be a factor of uncertainty.
So can use “DPOS=” assignment for modifying coordinates, but only need stop the virtual axis.
4. RUN fails to start multi-task.
Take notice: RUN STOP + BAS file name.
RUNTASK + SUB procedure name.
(These two forms are right.)
5. There is something wrong with the value calculated by ticks.
Ticks is used to subtract the lose count.
6. Approaches to achieve continuous interpolation.
Set the parameter “merge=on”. If corner deceleration and speed limitation of small round are required, more parameters should be set.
merge = on 'Start continuous interpolation.
CORNER_MODE = 2 'Start corner deceleration.
DECEL_ANGLE = 15 * (PI/180) 'Start decelerating at an angle of 15 degrees.
STOP_ANGLE = 45 * (PI/180) 'Down the angle of the minimal speed 45 degrees.
FULL_SP_RADIUS = 100 'the small circle.
●How to know the current moving range of continuous interpolation?
Judgement: MOVE_MARK and MOVE_CURMARK.
●How to set the rate-limiting for each segment?
Use MOVESP, some kinds commands. Simultaneously, set a few parameters, such as, FORCE_SPEED, ENDMOVE_SPEED.
7. Approaches to achieve point to point motion.
Actually there is no exact corresponding instruction, but can use MOVE directly. (Operate one axis at a time.)
MOVE AXIS(0)
MOVE AXIS(1)
8. Can VMOVE set multiple axes?
No, multiple commands are required. Like this:
VMOVE(1) axis(0)
VMOVE(1) axis(1)
9. How to set the parameters of interpolation motion?
The main axis is the first axis of BASE, and that’s the parameters of the interpolation.
BASE(1,2)
move(1000,122) 'The parameter of Axis 1 is the interpolation parameter.
move(1000,122) axis(0) 'The parameter of Axis 0 is the interpolation parameter.
10. Why the interrupt function is useless?
The interrupt switch is closed by default, you can check whether the system parameters of the interrupt switch are enabled.
11. Can the input jump as the interrupt function?
No. Theoretically, the number of inputs exist thousands, so it can’t achieve so many interrupt functions.
12. How to access the variables defined by controller from the PC?
The best is, the variables, arrays and others are defined as global variables, then be modifed and read through the execute function.
13. Whether all commands can be sent directly from the PC?
Some commands are restricted to be sent from the PC, such as, WALT. That’s because the PC command channel will be blocked. Also, it is impossible to define variable arrays through PC commands.
14. How to stop the motion immediately?
There is no absolute stop immediately, but by setting the fastdel parameter as a large value, it can stop quickly in the limits or rapidstop. Move again, you’d better add the judgement, wait idle, then rapidstop ignores the Base, and all axes are stopped.
15. How to implement handwheel?
Use connect instruction to implement it, see handwheel routines,
16. Forward and Reverse can’t change the motion direction immediately?
Forward and Reverse are used with a buffer each time, so it’s better to use the Cancel and then operate a new motion instruction.
Another way, use vmove. Vmove can judge former insructions automatically, if it is the vmove itself, the direction will be changed directly. Therefore, vmove is the best choice to achieve the jog kinds of functions.
17. How to access some system states directly through Modbus?
The special MODBUS register can access IO, location and so on.
Bit 10000: start to input. Bit 20000: start to output.
Each axis of the word register occupies two words in float form:
#define MODBUS_REGNUM_DPOS_X 10000
#define MODBUS_REGNUM_MPOS_X 11000
#define MODBUS_REGNUM_VP_SPEED_X 12000
18. After Cancel, the motion is operating.
The default of Cancel just cancel the current motion, not the buffer motion, with the parameter2, cancel(2), all will be canceled.
19. Can the print insrtuction be controlled, so no need to delete the code when printing isn’t required?
Use TRACE WARN ERROR print, assigning different values to ERRSWICH, it can control the state of output for corresponding instruction.
20. Does ZMC controller support different pulse equivalent as the circular interpolation?
Yes, it does.
21. Forcespeed has been set, but the actual motion speed hasn’t reached the forcespeed.
The speed parameter limits the interpolation movement, and it’s dynamic. Just need to change the speed.
22. How to save data when power off?
The data of VR can be saved in power down, for others, can be written in flash, and be read when the electricity.
23. The variable has been defined, but it can not be accessed by another file?
Because there are three types of variables, global, file and local. And the default is file variable, only can be accessed by the current file. Please modify into global variable, this way, all things can be accessed.
24. Sub has been defined, but can’t be called by another file?
There are two types of sub, global and file. And the default is file sub, only can be accessed by the current file. Please modify into global variable, this way, all things can be accessed.
25. There are errors when the program is running, how to find them?
Don’t restart. Use ZDevelop tool to connect(select the way to attach the current program), then can view the program running internal state and error location.
Or input “ ?*task” in the command bar, can also refer the reason and error location.
26. How to close the internal WARN output?
Set the system parameter, ERRSWITCH<2.
27. How to deal with the Print output is not neatly arranged?
You can use TOSTR format output.
28. How long the modified Offpos will be taken effect?
No need waiting too long, generally, it takes effect immediately.
1. error: 2032:Invalid char is met. What the reason of this?
Generally, because there appears Chinese character, can check whether the quotation marks and other symbols are in Chinese.
2. If wants to automatically support multiple models of controllers, how to operate in the program?
The controller basic model can be attained in CONTROL parameter. And the specification of flash can be attained in FLASH_SECTES FLASH_SECTSI.
3. The network connection is down.
Check the IP address of the PC, they should be in the same network segment.
Check the IP address of the controller, can view by connecting the serial port.
Check the firewall settings on the PC.
4. PC can’t connect Internet and the controller simultaneously.
Method1: Change the IP address of the controller to the same network segment as the PC and gateway.
Method2: Modify the subnet mask of the PC so that the gateway and controller IP addresses are on the same network segment. Such as, 255.255.128.0
5. After IDLE, MPOS still changes.
After IDLE, DPOS doesn’t change any more, but MPOS is not necessarily stable, you can delay or wait for the MPOS to reach the end position.
6. CAMBOX motion isn’t triggered successfully by DEFPOS sometimes.
Don’t change back after modifying DEFPOS, it should delay one period and make sure CAMBOX motion has detected initial conditions. If it starts immediately, there is no need a location trigger.
7. How a nonautomatic run file can be done one time by itself?
Input “run filename” in the command line, the name is for required file, but if the file has been changed, all needs to be downloaded again.
8. It rushes over the limits.
Improve FASTDEC Settings or speed up the sensing range of the limit signal.
9. There is always a deceleration at the boundary when using the motion SP instruction.
Check two parameters, STARTMOVE_SPEED and ENDMOVE_SPEED, the two and FORCE_SPEED, same, they are brought with buffer in SP instruction.
10. MERGE has been set, but not sequential.
Check if MERGE sets in the first BASE axis of the MOVESO command.
11. Sensor signal pulsation, one signal affected by another signal.
Check if the power supply of the IO sensor and the IO power of controller are different. Connect the bottom line of the TWO powers.
12. When do homing, there appears find in opposite direction in a slow speed attaching at original position.
If it is the servo motor, exceeding the origin, the controller will give an extra protection. Essentially, the controller should stop when testing the origin, but it couldn’t test the origin after stop completely. So the phenomenon is emerged because the axis is mistakenly thought to have passed the origin induction range.
Solution: LSPEED is set as 0 when returning to origin, producing a certain deceleration distance.
13. WHILE NOT 1 can’t jump out the loop.
NOT of ZBASIC is flipped as per, NOT 1 is -2, so it’s not still FALSE. Use either WHILE FALSE or WHILE NOT TRUE, where TRUE has a value of -1 and the result of flipping -1 equals 0.
6. Q&A of Hardware Interface IN (NPN)
(1)
Basic & General Wiring
(2) Basic Information
A.
IN Electric Level
1) Common electric level of IN is 24V, because there is one pull-up resistor inside.
2) IN is conducted by low level, for example, high-speed IN will be conducted when opening voltage is less than 15V, and will be disconnected when it is more than 15.1V. For details, please refer to hardware manual’s IO specification.
3) IN impedance is used to limit IN current, for max current, please refer to user manual IO specification.
4) Optical Isolation is used to protect internal circuit, that is, internal circuit can’t be connected directly, then, avoid external circuit’s problem interference.
5) It is extended into inside.
B.
Notes of IO
1) controller’s EGND and main power’s EGND are conducted internally, but for the main power supply, it must use EGND that on the power terminal, others can’t be used.
2) don’t connect all EGND together using the conduction cable by yourself, no need to connect EGND that are not used.
3) in user manual, IO parameters and related reference values are based on 24V main power, if your main power is not 24V, there will be deviation.
4) generally, IO signals are normal, if there appear problems, please capture corresponding waveform.
C.
High-Speed IN & Low-Speed IN Frequency
For some controllers, it has high-speed inputs and low-speed inputs, please confirm from user manual. Generally, input signal frequency of high-speed IN is 100kHz, other normal (low-speed) inputs’ frequency is about 5kHz.
In user manual, if there is no special description on digital IN / OUT signal type, NPN type is default. PNP also can be customized, please contact with us.
D.
IN Special Functions
Some controllers IN ports have other special functions except digital input, such as, latch, single-ended encoder, etc., extra IN also can be set as special signal, like, origin signal (DATUM_IN), positive position limit signal (FWD_IN), negative position limit (REV_IN), alarm signal (ALM_IN). What’s more, INVERT_IN command can be used to invert the level.
(3) Related IN Problems
Question 1:
No IN Signals Detected? (No IN Signal / No IN / No Reaction of IN)
Answer 1:
a.
In RTSys / ZDevelop software, find IN, then check whether IN gets the data.
b.
Check whether now used controller connects one extra IO power.
c.
See whether IN No. is consisted with operated one.
d.
See signal electric level, whether it is matched with IN (PNP signal), see whether public ends are connected.
e. Connect IN to EGND shortly to see whether there is signal on IN, if yes, controller IN is normal, then you can check external input device’s output signal and the wiring, for wiring, please refer to corresponding user manual.
f.
After EtherCAT drive IO mapping, when the IO signal shrinks, please see all IO mapped addresses, they can’t be the same. You can check in RTSys / ZDevelop – Controller – Controller State, in the window, Slot0Node will show corresponding bus drive IO mapping.
g.
After CAN expansion board IO mapping, when the IO signal shrinks, please see all IO mapped addresses, they can’t be the same. You can check in RTSys / ZDevelop – Controller – Controller State, in the window, ZcanNode will show corresponding expanded IO mapping.
h.
While using expansion board, if you used single power or non STP cable, IN may be abnormal.
Note: please do expansion board wiring according to manual!
Question 2:
Invalid Hardware Position Limit Signal? (Invalid Position Limit Signal / Position Limit Setting / Position Limit)
This is mainly for the occasion when position limit sensor connects to controller IN.
Answer 2:
a.
See whether position limit sensor is normal, you can watch position limit sensor’s signal changes in RTSys / ZDevelop “IN” window.
b.
Check position limit switch mapping is correct or not.
c.
Check whether public ends of position limit sensor and controller are connected.
d.
While manually moving the axis to test position limit triggering, see whether sensor’s signal is valid all the time (won’t shrink).
e.
When you saw someplace is abnormal, current position limit parameter should be set correctly, prevent the parameter from modifying wrongly when in motion.
Question 3:
Over Position Limit? (Position Limit Exceed / Position Limit Not Stop)
For example:
It will not stop immediately when meeting the position limit, full-stop is done after a certain of time.
Answer 3:
a.
Too low deceleration, you can enlarge the deceleration parameter “FastDec”.
b.
Make the baffle sensing range of position limit signal large.
c.
See position limit switch configuration, see it is correct and valid.
Question 4:
Sensor Signal Jumps, One Signal is Affected by Others? (IN / Sensor IN, Signal Jumps / Signal Interference / Signal Mutual Influence)
For Example:
External sensor is normal, but one certain IN signal shrinks.
When powered on, IN is normal, then cause the cylinder appear strange actions.
Answer 4:
a.
See whether IO sensor’s power is same as controller’s IO power, at this time, you need to connect their ground lines together.
b.
After EtherCAT drive IO mapping, when the IO signal shrinks, please see all IO mapped addresses, they can’t be the same.
Question 5:
Unfixed Position Limit Signal? (Invalid Position Limit Sometimes / Position Limit Signal is Not Fixed)
Answer 5:
a.
See whether position limit signal is set in the loop, and the set position limit signal value is not fixed.
b.
While manually moving the axis to test position limit triggering, see whether sensor’s signal is valid all the time (won’t shrink).
Question 6:
Latch MARK is Not Triggered in “Latch”?
“What is It (For Example)”
Latch function is used, and use REG_INPUTS command to map the latch signal interface as IN1, latch R0 mode is used, and latch MARK is not triggered all the time.
“Why is It”
The controller is ZMC306X, its latch IN is limited, that is, R0 - > IN0, R1 - > IN1, if you want to use IN1, please use corresponding R1 latch mode.
Answer 6:
Please use the latch mode that supports two methods. And note if the refresh signal edge is not immediate, mark position will be wrong, then latch result is also not correct.
7. Q&A of Hardware Interface OUT (NPN) (1) Basic & General Wiring (2) Basic Information A. Freewheeling Diode --What-- Each OUT has the freewheeling diode used to protect MOS. --Why-- Sometimes, you need to externally connect inductive loads (like, relay) to OUT, when OUT is ON, the inductive load will save the energy, when OUT is OFF, two sides’ voltage will be up to even +1000V, then breakdown MOS. At this time, if there is one freewheeling diode, the increased voltage will open the diode, that is, which will release the inductive load’s energy that was saved before, in this way, MOS is protected well. B. Overcurrent Protection --What-- Controller’s external digital outputs OUT all support “overcurrent protection”. --Why-- “Overcurrent Protection” works because of serial connected PTC thermistor, the current exceeds the threshold value, then causing PTC heating, and when the temperature achieves the PTC upper limit, PTC will not output, until the temperature is low after one certain of time, PTC will resume automatically. --Note-- This function is only valid in controller general IO, that is, IO in axis interface AXIS doesn’t support this. (3) OUT (NPN) Related Q & A Question 1: The OUT Voltage is 0V? (OUT No Voltage) “What is It (For Example)” Measure OUT and EGND, whatever OUT is ON or OFF, the voltage is still 0V. “Why is It” When OUT is ON, OUT belongs to high impedance, that is, it disconnects with the inside, so no voltage (0V). When OUT is OFF, OUT and EGND are in short circuit state, the result will be 0V. Answer 1: a. You can connect one pull-up resistor to OUT, then measure. When you pull it up to 24V, please use at least 3.3KΩ color ring resistor, when you pull it up to 5V, please use at least 100Ω color ring resistor. b. You can connect OUT to IN, then check it again. c. Multimeter dials to buzzer level, then measure EGND and OUT, whether they are conducted. Question 2: OUT Virtual Voltage? (Voltage in OUT Empty Load / OUT Default Voltage) “What is It (For Example)” OUT is in empty load, and it is OFF, there is one about 0.7 voltage measured. “Why is It” This virtual voltage is caused by MOS leakage current, and it will be different in different time, and with different multimeters, but if you tested using oscilloscope, you will see the 0V electric level all the time. Answer 2: a. Actually, this voltage won’t produce any influence in real usage, just ignore it. Question 3: PWM OUT Waveform Distortion? (PWM Abnormal / PWM Distortion) “What is It (For Example)” When OUT PWM signal appears waveform distortion, and the frequency is bigger, the distortion is more serious. “Why is It” Caused by OUT itself or loaded parasitic capacitance. Answer 3: a. Change one pull-up resistor as one that is with small resistor value, because pull-up resistor will cause bad waveform (not recommend you connect one pull-up resistor, and use high voltage). b. Use the controller that has specified PWM OUT, or change one parasitic capacitance whose load is small. c. OUT distortion is not only in PWM signal, for others, like, single-ended PUL/DIR, also exist this situation “more frequency, much distortion”. If no way to change the pull-up resistor, and you can’t allow this kind of distortion, please change one device. Question 4: No HW Output? (PSO No Out / Fly-Photo No Out / High-Speed OUT No Out) Answer 4: a. You can use oscilloscope to capture data waveform, see if it outputs the waveform, if no, please check whether the HW position is set correctly in the program. Or because axis control POS doesn’t pass the comparison position in order, or do low-speed test. b. If there is output waveform captured by SCOPE, but hardware oscilloscope has no output. You can control OP switch separately, check if one single OP is wrong – please refer to “Question A & Answer A”. Question 5: OUT No Respond? (No Output / No Action / No Respond) “What is It (For Example)” Open the OUT, the real OUT on the external device has no reaction. Answer 5: a. Check if the controller needs IO power, if yes and now already connected external IO power, please see if the IO POWER led is ON. b. OUT No. should be consistent with operated one. c. Hardware wiring must be correct. d. See if it is resetting continuously in the program. e. In RTSys / ZDevelop, find “OP” view, check the reset situation (not reset all the time), please note test it in RTSys when controller inner BASIC program and PC program stopped. f. Check IO No., they can’t be the same: open RTSys / ZDevelop, find “ZcanNode” in “controller state” window, then you can check CANIO expansion board state information, and for EtherCAT IO expansion board state information, which can be known from “Slot0Node” still in “controller state” window.
8. Q&A of Hardware Interface Analog AD & DA (1) Basic & General Wiring (2) Basic Information A. How to Use Analog Generally, most of analog interfaces on the controller are 12-bit resolution, and the scale range is 0-4095, 0-10V, the data refresh ratio is 1KHz. If this kind of specification can’t meet your needs, you also can select the controller that has 16-bit resolution, or use it together with expansion module. B. Notes a. For analog interface, it only can connect to analog devices. b. If you need correct voltage, please wire analog’s load impedance according to the manual. c. When the analog interface is spare, there is also “voltage fluctuation”, which is normal. At this time, you can connect the free analog terminal to analog AGNG, then this can be solved. (3) OUT (NPN) Related Q & A Question A: Big Deviation after Connecting Load to Controller DA? (Incorrect Analog Output) Answer A: a. Check the impedance of load AD, if it is too small, the measured values on the terminal will appear obvious deviation. b. You can measure the analog voltage in empty load, if it is normal, then connecting to AD shortly, see if it is normal, if not, the reason will be hardware problem. Question B: Controller AD Acquisition Serious Jumping? (AD Big Wave) Answer B: a. The sensor signal itself has the problem, or it is interfered. If the problem is itself, please check it using specific device. If the problem is interference, please check the wiring, don’t make the signal cable together with the strong circuit. b. Actually, the controller has the wave when in empty load, if you connected the load, it will be obvious, you can use the software to filter and get the average value.
9. Q&A of Hardware Interface -- Grounding of EGND, GND, PE, FG, EARTH…
GND: current circuit channel, so generally it is negative pole when in DC power supply, for the function, it is used as signal public end usually.
“EGND” interfaces on the controller all can be used as GND of IO, and “GND” on the controller is inner control chip’s GND, therefore, to be clear, IO’s GND is called “EGND”. What’s more, please use power’s negative pole and IO’s EGND separately. Dut to power isolation, “EGND” and “GND” are irrelevant, that is, they can’t be shared. Even if that, they both belong to GND.
In addition, FG, PE, and EARTH are protection grounding, used to connect to machine shell, the difference is only the editing. And signal cable’s shield layer is also connected to this. All these will be connected to ground finally.
Question:
What’s the Problem when Controller EGND & AGND are Conducted due to External Analog Device?
Answer:
usually, no problem, but this means there is no isolation.
Actually in our controllers, most of AGND and inner GND are connected, to clearly show “its function is analog reference”, then it is marked as AGND. AGND and EGND are conducted, which means GND and EGND are connected.