Labview UI project for Linuxcnc

More
7 years 3 months ago #138836 by auto-mation-assist
I'm getting closer to duplicating the panels I generated a while back for Qtvcp converted to Labview code and pleased with the results so far. I have attached a picture that shows nine subpanels that are being placed onto the main control panel programmatically.



.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #138837 by auto-mation-assist
Perhaps those functions can be made available from Norbert in the updated versions on gmoccapy in the future. Big sliders that are easy to control from a touch screen can take up a lot of space and that may be one of the reasons why sliders have seen limited use.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #139057 by auto-mation-assist
Been working on the UI's on screen keyboard with the help of some available examples and have it working now. It is also accepting input from the PC's regular keyboard. The text in the display is from the on screen keyboard. It should work with touch screen.

I will need to work on reading and writing to configuration files next and once that is done I can start on network programing and testing.

The following user(s) said Thank You: chimeno, tommylight

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #143021 by auto-mation-assist
It has been a while since I gave a update. My progress has been good and I have been working on the actual interface to LinuxCnc. Many have said that the NML interface should be removed but there is actually no real need to do that. My interface will link into TCP port 5005 which in my opinion has been ignored but is perfectly usable but somewhat scary if you read all the NML and encoding and decoding information available. The below shows that port 5005 actually works from one of my hex encoded commands from IP address 10.10.20.1.

(time=1566596264.230845,pid=8022): Socket opened by host with IP address 10.10.20.1.
(time=1566596269.241978,pid=8022): read 20 bytes from 4
(time=1566596269.242003,pid=8022): TCPSVR request received: fd = 4, serial_number=1, request_type=2, buffer_number=1
(time=1566596269.242018,pid=8022): read 4 bytes from 4
(time=1566596269.242038,pid=8022): rcs_sem_post(2293760) called.
(time=1566596269.242069,pid=8022): wrote 12 bytes to 4
Issuing EMC_TASK_SET_STATE -- ( +505,+24, +17, +0,)
emc/task/emctaskmain.cc 2352: error executing command 505:EMC_TASK_SET_STATE
emcTaskIssueCommand() returning: -1

It is returning an error because the actual selection of Manual, MDI or AUTO data was not sent. Thus the +0 value instead of a 1 (Manual), 2 (MDI) or 3 (Auto) value in EMC_TASK_SET_STATE -- ( +505,+24, +17, +0,).

The value required in that field is actually a sub command which is determined by a enum value as defined in emc.hh. I'm working on building commands to handle sub command parts now. The command required to be sent to execute EMC_TASK_SET_STATE in binary via TCP without the sub command is: 0000 0001 0000 0002 0000 0001 0000 0004 0000 0004 0000 01F9 0000 0000 0000 0000.

I have attached a command list that I have partially completed for each NMLtype in file src\emc\nml_intf\emc.hh for info. Work is in progress to get a complete command set for remote Gui use.
Last edit: 7 years 2 months ago by auto-mation-assist. Reason: Removed the word binary
The following user(s) said Thank You: Mike_Eitel, phillc54, tommylight

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #143022 by auto-mation-assist
One of the more interesting commands is the EMC_TASK_PLAN_INIT it executes and then sets additional values from the sub commands it calls up from a list.
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
Last edit: 7 years 2 months ago by auto-mation-assist. Reason: Changed: The command that I manually issued

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #143096 by auto-mation-assist
I have been searching for how to input the 'task set mode' enum number and it appears to me right now that over the years this may have been removed or perhaps re coded. 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 ??

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds
Powered by Kunena Forum