Please enable JavaScript to view this site.

MovingCap Ethernet Drives - Software Manual

Python output and error messages via UDP port 14999

Python console output, such as print(...), and Python error messages can be received via a network connection on UDP port 14999.

•Open a UDP peer connection to the IP address of the MovingCap servo drive and UDP port 14999.

•Send an empty text line or the ASCII character CR (“\r”, ASCII code 13 decimal).

NOTE: When multiple UDP connections are active, the UDP debug interface works like the MovingCap REFGO interface, or a corresponding Python object from the mcnet module MovingCap always sends its response only to the connection from which it most recently received a request.

In Windows, you can do this using the Docklight Scripting tool as follows:

•Download and install Docklight Scripting. You do not need a license key for simple tests / displays.

•Go to the movingcap.de Service Portal, search for Docklight_MovingCap_ETH_Debug_Output.zip, download this file and unzip it.

•Start Docklight Scripting and open the project Docklight_MovingCap_ETH_Debug_Output.ptp

•Refer to the project documentation displayed in Docklight Scripting (from the file Docklight_MovingCap_ETH_Debug_Output.ptn):

MovingCap ETH Debug Interface via UDP Port 14999

 

* Click the "---> Connect" Send Sequence to open the connection and send an initial <CR> to the MovingCap.

 

A typical initial response could look like this:

 

12.12.2022 12:55:54.950 [PC] - <CR>

 

12.12.2022 12:55:54.955 [mc] - SYS_Initialize: The MPFS2 File System is mounted<CR><LF>

TCP/IP Stack: Initialization Ended - success <LF><CR>

Host MOVINGCAP TCP   - NBNS disabled<CR><LF>

IP Address: 192.168.2.150 <CR><LF>

REFGO - opening server<CR><LF>

code: starting upload...<CR><LF>

code: upload complete, script id: maxTRACK N23 demo rev8<CR><LF>

<CR>

><CR><LF>

 

From this point on, you can see both Python print() output, but also Python errors in the Docklight communication window:

 

12.12.2022 12:57:11.074 [mc] - code: compile, script id: maxTRACK N23 demo rev8<LF><CR>

code: execute, script id: maxTRACK N23 demo rev8<LF><CR>

Hello World from MovingCap!<CR><LF>

 

Here is what MovingCap reports after uploading and starting a script that contains an obvious Python error - the amount of spaces in line 22 is incorrect, rep. this line is not properly indented. See the Internet for "Python Indentation" and why this is important:

 

12.12.2022 12:58:57.769 [mc] - code: starting, script id: maxTRACK N23 demo rev8<LF><CR>

 

12.12.2022 12:58:57.869 [mc] - code: compile, script id: maxTRACK N23 demo rev8<LF><CR>

Traceback (most recent call last):<CR><LF>

 File "<stdin>", line 22<CR><LF>

IndentationError: unexpected indent<CR><LF>