Skip to main content
Submitted by Aditya on Thu, 11/02/2017 - 07:06

I am trying to run a simple contour mode example code provided in the documentation on the DMC1846 (Version: DMC1846 Rev 1.0c). I am unable to run the contour mode once again after the "CD 0=0" command is sent to controller. I tried to reissue the "CMX" command to configure the X-axis for this mode but it does not seem to work, i.e., the motor does not respond to any of the "CD m=n" commands even though the controller does not throw any error when the commands are issued. Once the "CD 0=0" command is issued no other axis seems to work in the contour mode.

The code that I am using:
#A
CMX
CD 240=2
CD 480=3
CD 480=4
CD 0=0
#Wait;JP#Wait,_CM<>511
MG "END"
EN

Test procedure:
1) Load the program into controller using the terminal in Galil suite
2) Execute the program by issuing "XQ #A, 0"
3) The motor runs as desired
4) Try to re-execute the program by issuing the "XQ #A,0" command
5) The program runs but the motor does not respond

The only way I was able to set any axis in the contour mode again was to reset the controller using the "RS" command and reconfigure the required axis for the contour mode.

I am not sure if I am missing some commands here. Could you please help me resolve this issue.

Thanks in advance.

Comments 1

andriys on 11/02/2017 - 16:49

Hello Aditya,
The example in the user manual was written for one-time execution.
In your program CD 0=0 command sets the parameter of DT command (Delta Time) to 0.
To be able to re-execute the program every time without a problem, DT needs to be set back to 1.
Please add DT1 command before CMX command in #A subroutine.
The reason it works after a reset is that DT gets reset to a default value of 1 before you run your code.
If you need further assistance please feel free to email support@galil.com.

Best regards,
Andriy Stasyuk
Applications Engineer
Galil Motion Control