How to Call a Subroutine with Parallel Port

More
2 years 8 months ago #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 to join the conversation.

More
2 years 8 months ago #292850 by Aciera
You can define 'MDI-Commands' in the [HALUI] secton your ini file:
Code:
[HALUI] MDI_COMMAND = M110 MDI_COMMAND = M120 MDI_COMMAND = M130

with the above you can then run 'M110',
Code:
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

 

Please Log in to join the conversation.

More
2 years 8 months ago #292859 by wisao
Thanks Aciera and then how can i create a Call a Subroutine with M code ?

Please Log in to join the conversation.

More
2 years 8 months ago #292865 by Aciera
You can call it directly:

MDI_COMMAND = o<your_subroutine> call

Please Log in to join the conversation.

More
2 years 8 months ago #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.

Please Log in to join the conversation.

More
2 years 8 months ago #293091 by wisao
thanks friend, worked very well

Please Log in to join the conversation.

Time to create page: 0.509 seconds
Powered by Kunena Forum