Labview UI project for Linuxcnc
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
The command that I manually issued to port 5005 was:
0000 0001 0000 0002 0000 0001 0000 0004 0000 0004 0000 01F5 0000 0000 0000 0000
(time=1566596833.133562,pid=8641): Socket opened by host with IP address 10.10.20.1.
(time=1566596841.388166,pid=8641): read 20 bytes from 4
(time=1566596841.388190,pid=8641): TCPSVR request received: fd = 4, serial_number=1, request_type=2, buffer_number=1
(time=1566596841.388204,pid=8641): read 4 bytes from 4
(time=1566596841.388222,pid=8641): rcs_sem_post(2457600) called.
(time=1566596841.388253,pid=8641): wrote 12 bytes to 4
Issuing EMC_TASK_PLAN_INIT -- ( +515,+20, +8,)
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=32,type=EMC_TRAJ_SET_TERM_COND}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=96,type=EMC_TRAJ_SET_G5X}) : list_size=2, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=96,type=EMC_TRAJ_SET_G92}) : list_size=3, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=32,type=EMC_TRAJ_SET_ROTATION}) : list_size=4, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=40,type=EMC_TRAJ_SET_SPINDLESYNC}) : list_size=5, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=32,type=EMC_SPINDLE_OFF}) : list_size=6, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=32,type=EMC_SPINDLE_OFF}) : list_size=7, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=24,type=EMC_COOLANT_MIST_OFF}) : list_size=8, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=24,type=EMC_COOLANT_FLOOD_OFF}) : list_size=9, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=96,type=EMC_TRAJ_SET_OFFSET}) : list_size=10, line_number=0
NML_INTERP_LIST(0x55ebcd591d20)::append(nml_msg_ptr{size=32,type=EMC_TRAJ_SET_TERM_COND}) : list_size=11, line_number=0
emcTaskPlanInit() returned 0
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=32, type=EMC_TRAJ_SET_TERM_COND}, list_size=10
emcTaskPlanLevel() returned 0
task: main loop took 0.068981 seconds
Issuing EMC_TRAJ_SET_TERM_COND -- ( +222,+32, +0, +2,0.000000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=96, type=EMC_TRAJ_SET_G5X}, list_size=9
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_G5X -- ( +224,+96, +0, +1,-0.000000,0.000303,-1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=96, type=EMC_TRAJ_SET_G92}, list_size=8
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_G92 -- ( +227,+96, +0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=32, type=EMC_TRAJ_SET_ROTATION}, list_size=7
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_ROTATION -- ( +226,+32, +0,0.000000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=40, type=EMC_TRAJ_SET_SPINDLESYNC}, list_size=6
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_SPINDLESYNC -- ( +232,+40, +0,0.000000,\000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=32, type=EMC_SPINDLE_OFF}, list_size=5
emcTaskPlanLevel() returned 0
Issuing EMC_SPINDLE_OFF -- ( +1305,+32, +0,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=32, type=EMC_SPINDLE_OFF}, list_size=4
emcTaskPlanLevel() returned 0
Issuing EMC_SPINDLE_OFF -- ( +1305,+32, +0,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=24, type=EMC_COOLANT_MIST_OFF}, list_size=3
emcTaskPlanLevel() returned 0
Issuing EMC_COOLANT_MIST_OFF -- ( +1405,+24, +0,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=24, type=EMC_COOLANT_FLOOD_OFF}, list_size=2
emcTaskPlanLevel() returned 0
Issuing EMC_COOLANT_FLOOD_OFF -- ( +1407,+24, +0,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=96, type=EMC_TRAJ_SET_OFFSET}, list_size=1
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+96, +0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
NML_INTERP_LIST(0x55ebcd591d20)::get(): {size=32, type=EMC_TRAJ_SET_TERM_COND}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_TERM_COND -- ( +222,+32, +0, +2,0.005000,)
task: main loop took 0.003233 seconds
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
Please Log in or Create an account to join the conversation.
In older versions of Lcnc "extern int
emcTaskSetMode(int mode);" is present in emc.hh
but not in more recent versions versions of
emc.hh. It does make me wonder if past clean up
work on Lcnc removed some NML related items that
should have stayed in order to maintain full
functionality of TCP port 5005. Is this a
possibility ??
commit: df74db6f9 Thu Nov 28 12:40:17 2013 -0700
task: move a bunch of function declarations
to a more specific header
Ref: github.com/LinuxCNC/linuxcnc/commit/df74db6f9
First incorporated in v2.6.0:
$ git tag --contains df74db6f9
v2.6.0
...
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
I also took some time to look at the status request responses and noticed that entering NMLTYPE 1499 actually routes to 1999 internally by Lcnc since this is what is reported in a typical status message. The same for other status requests using type 1599. This leads me to suspect that there is a possibility that NMLTYPE 1999 is being used for every type of status request now. My byte count shows 8244 for type 1999 status request and it has a message length of 139741. This using my QTvcp development system not updated since around march of this year..
An additional 20 byte message is send just prior to sending status data and contains the below items (all 4bytes in length).
Typically looks like (Hex): 0000 0001 0000 0002 0000 2034 0002 21DD 0000 0001
0 - 0000 0001 Remote Request type
4 - 0000 0002 Buffer number
8 - 0000 2034 Status part of the message in bytes (8244)
12 - 0002 21DD message lenght (139741)
16 - Serial number echo that user sent.
This is immediately followed by: FFFF FFFF FFFF FFFF FFFF FFFF and then the status message itself in my tests.
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
1 = manual mode, 2 = auto, 3 = mdi.
I need to check on this value further: (read 35 bytes from 4) in the below responses
.
Manual Mode
(time=1566803508.455991,pid=14498): Socket opened by host with IP address 10.10.20.1.
(time=1566803519.480054,pid=14498): read 20 bytes from 4
(time=1566803519.480080,pid=14498): TCPSVR request received: fd = 4, serial_number=1, request_type=2, buffer_number=1
(time=1566803522.060326,pid=14498): read 35 bytes from 4
(time=1566803522.060359,pid=14498): rcs_sem_post(6750208) called.
(time=1566803522.060391,pid=14498): wrote 12 bytes to 4
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +3, +1,)
Auto Mode
(time=1566803618.732544,pid=14498): Socket opened by host with IP address 10.10.20.1.
(time=1566803622.541164,pid=14498): read 20 bytes from 4
(time=1566803622.541190,pid=14498): TCPSVR request received: fd = 4, serial_number=1, request_type=2, buffer_number=1
(time=1566803626.041421,pid=14498): read 35 bytes from 4
(time=1566803626.041455,pid=14498): rcs_sem_post(6750208) called.
(time=1566803626.041488,pid=14498): wrote 12 bytes to 4
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +4, +2,)
MDI Mode
(time=1566803813.570980,pid=14498): Socket opened by host with IP address 10.10.20.1.
(time=1566803818.783676,pid=14498): read 20 bytes from 4
(time=1566803818.783711,pid=14498): TCPSVR request received: fd = 4, serial_number=1, request_type=2, buffer_number=1
(time=1566803822.563868,pid=14498): read 35 bytes from 4
(time=1566803822.563901,pid=14498): rcs_sem_post(6750208) called.
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +8, +3,)
in the above: the +505 is NMLType, +24 is bytes for the task, +8 is serial number, +3 is enum selection value
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
This a a snap shot of the temporary vi that I used for communicating with LinuxCnc over the network using the NML interface on port 5005.
You may notice that C axis position display is not present. I forgot to add the display for it but its position data is being processed.
Attachments:
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
And here is some of my info for sending commands with those that have options available via enums. The arrow on the buffer is pointing the wrong way. I will fix that in my notes.
I will be working on the command formats that use and require variable user data to be entered instead of enums next.
Attachments:
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
- Posts: 425
- Thank you received: 81
Attachments:
Please Log in or Create an account to join the conversation.