How to Call a Subroutine with Parallel Port

More
08 Feb 2024 12:51 #292844 by wisao
Hi guys,

If i use  "net run-btn => halui.program.run" it will start my NC program.

How Can i set a new line to run a specific part of the code? Could be a Subroutine like "o99".

Thanks
William

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

More
08 Feb 2024 14:20 #292850 by Aciera
You can define 'MDI-Commands' in the [HALUI] secton your ini file:
[HALUI]
MDI_COMMAND = M110
MDI_COMMAND = M120
MDI_COMMAND = M130

with the above you can then run 'M110',
net run-m110   <= your_pin_here                => halui.mdi-command-00
net run-m120   <= another_pin_here           => halui.mdi-command-01
net run-m130   <= yet_another_pin_here    => halui.mdi-command-02

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

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

More
08 Feb 2024 17:05 #292859 by wisao
Thanks Aciera and then how can i create a Call a Subroutine with M code ?

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

More
08 Feb 2024 18:13 #292865 by Aciera
You can call it directly:

MDI_COMMAND = o<your_subroutine> call
The following user(s) said Thank You: wisao

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

More
08 Feb 2024 18:21 #292866 by Aciera
'MDI_COMMAND' means it is literally executed as an MDI command, meaning you can define any command that would also work in the mdi entry field. For it to be executed the controller has to be able to switch to mdi mode, so it won't work if you are running a program.
The following user(s) said Thank You: wisao

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

More
11 Feb 2024 14:16 #293091 by wisao
thanks friend, worked very well

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

Time to create page: 0.101 seconds
Powered by Kunena Forum