Call external subroutine not working in recent versions of LCNC

More
7 years 8 months ago #126231 by andypugh

shipmodeller wrote: Booting up and getting ready... will send you results

1: Homed unit
2: Pressed First button ... halui.mdi-command-00 == false
3: Went to mdi tab - pressed button -> halui.mdi-command-00 == false
4: entered o<toolchange3> call in mdi window. Toolchange executed correctly
5: Pressed First Button -> halui.mdi-command-00 = true and toolchange worked


OK, so this so far sounds as though the subroutine call does work as long as halui.mdi-command-00 is actually driven true, and that the problem appears to be in the classic-ladder interlock.

What does the Classic Ladder system do?

What happens if you miss it out? ie change this in the postgui hal file
Code:
-------------------------------------------------- # set up the z-axis wood touchoff button net remote-z-axis-touchoff classicladder.0.in-00 <= pyvcp.z-axis-touchoff # set to mdi mode # show pin net mode halui.mode.is-mdi => classicladder.0.in-01 # wait for motion to finish Use this file if you are using the EMC2 version 2.3.x or newer. net in_pos motion.in-position => classicladder.0.in-02 net z-touchoff classicladder.0.out-00 => halui.mdi-command-00
to
Code:
-------------------------------------------------- # set up the z-axis wood touchoff button net pyvcp.z-axis-touchoff => halui.mdi-command-00

6: Loaded "Checkers.ngc"
7: Pressed first buttin -> halui.mdi-command-00 == false.. No tool change
8: Mdi panel - tried to do o<toolchange3> call -> failed ..error message failed to find Otoolchange3 before EOF


Let us skip over that last error for a moment, that sounds different...

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

More
7 years 8 months ago - 7 years 8 months ago #126233 by shipmodeller
How can I say this gently? .... it hosed the system, linuxCNC won't come up

When I returned the file to the original state, and # out the added line.. LinuxCNC came up

File Attachment:

File Name: custom_pos...2-11.hal
File Size:2 KB
Last edit: 7 years 8 months ago by shipmodeller.

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

More
7 years 8 months ago #126235 by andypugh

shipmodeller wrote: How can I say this gently? .... it hosed the system, linuxCNC won't come up


Ah, yes. I made a silly error, the net command needs a signal
Code:
-------------------------------------------------- # set up the z-axis wood touchoff button net z-touchoff pyvcp.z-axis-touchoff => halui.mdi-command-00

It might be useful to also halmeter motion.in-position and halui.mode.is-mdi as those seem to be the inputs to the classic ladder.

(and you still haven't explained what the CL logic is internally)
The following user(s) said Thank You: shipmodeller

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

More
7 years 8 months ago #126236 by shipmodeller
OK.. that seemed to handle the button issue. Once the change had been made to the list... The button worked right away after the HOME. So, thank you on that one.

Of course, nothing changed with the Load file then no button. Please note that after the load of a file, I can still Zero XY with the Buttons. I just can't call in a toolchange.

I don't understand what you meant by "didn't explain CL" I don't know what CL means, and I don't see where you asked for that... but I might have missed that.

So the major problem now is the File load disables both mdi and button firing of toolchange.

And I just now have upgraded to the latest patch .. 4559

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

More
7 years 8 months ago - 7 years 8 months ago #126237 by andypugh

shipmodeller wrote: Of course, nothing changed with the Load file then no button.


I don't think that there is any "of course" about that.
Do you definitely see halui.mdi-command-00 go true with nothing else happening?


I don't understand what you meant by "didn't explain CL" I don't know what CL means, and I don't see where you asked for that... but I might have missed that.


CL == Classic Ladder. You have some ladder logic in your original HAL file, but haven't told us what it does.


So the major problem now is the File load disables both mdi and button firing of toolchange.
And I just now have upgraded to the latest patch .. 4559


Does nothing at all happen, or do you get the error that you showed earlier?
Last edit: 7 years 8 months ago by andypugh.
The following user(s) said Thank You: shipmodeller

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

More
7 years 8 months ago - 7 years 8 months ago #126238 by shipmodeller
The error that I get is error message: failed to find Otoolchange3 before EOF

I'm sorry about the CL issue, I didn't write that portion.. I modified the toolchange code, but the HAL stuff was copied, and copied.. I'm retired, been a coder of 53 years.. but now, just want to use the stuff... this used to work in previous versions before the 2.8 update. So, still feel strongly like something is changing ownership rights.. but I don't know how to drill down to find this, or how to setup any logs useful for this group to solve this.

If you think something in the CL is hosing this, then just tell me what file it is that sets that up, and I'll push it .. otherwise, I need to close up shop for night.. been a very long day
Last edit: 7 years 8 months ago by shipmodeller. Reason: Spelling error and poor grammar, sorry

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

Time to create page: 0.271 seconds
Powered by Kunena Forum