Fadal Retrofit - ATC cycle

More
23 Oct 2018 11:07 #119253 by andypugh
Replied by andypugh on topic Fadal Retrofit - ATC cycle
If you start linuxcnc from the command line you should see the Python errors in the terminal (command "linuxcnc" )

I tend to use "linuxcnc -l &" to open the last config and return to an interactive shell.

Then you can enter the Python command line, and see what you have.

My suspicion is that HAL_BIT pins are not boolean, so "is True" and "is False" will fail, these are likely to be integer values 0 and 1. Try "==" instead of "is"
(I am not at a LinuxCNC machine at the moment so can't test this theory)

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

More
23 Oct 2018 11:14 #119254 by COlger81
Replied by COlger81 on topic Fadal Retrofit - ATC cycle
For some strange reason, some basic python commands were not executing, for example; "sys.exit()"

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

More
23 Oct 2018 11:19 #119255 by andypugh
Replied by andypugh on topic Fadal Retrofit - ATC cycle
Do you see anything in the terminal output?

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

More
23 Oct 2018 11:22 #119256 by COlger81
Replied by COlger81 on topic Fadal Retrofit - ATC cycle
It gives me a "sys" is not defined. But in regards to the hall sensor line, it does not give any errors.

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

More
23 Oct 2018 11:43 - 23 Oct 2018 11:46 #119257 by Nitram
Replied by Nitram on topic Fadal Retrofit - ATC cycle
Just to provide another avenue, the auto tool change in question was ultimately achieved by having the sequence run via G code but having a subset of user defined M codes which compartmentalized the whole auto tool change sequence. Within these was also the usual "check for carousel in extended position" etc fault checking.

Then these were all brought together (again via G code) and made into the full M6 sequence (the M6 itself being re-defined to run the complete tool change G code).

It was felt that there would be advantages in having compartmentalized M codes for the individual segments of the procedure in case there were any crashes during the tool change sequence so that one could call a certain M code and carry out any rectifying actions in a step by step way.

For example, I left the probe in the spindle when I executed a tool change to get the tool I needed. Not the brightest thing to do, and because I didn't want to damage to probe I hit the E Stop. So, the carousel is sitting half way out and the whole machine is somewhere in the middle of a tool change. Having the ability to call smaller subsets of the tool change sequence via user defined M codes made it easy to retrieve the probe then send the carousel back to home. In other words, sort out the error and place the machine back into a known state.

Not knowing well the way classic ladder or python integrates with LCNC, can segments of code be run outside the entirety of the program? In other words with full and complete auto tool change routine written in classic ladder, would it still be able to send the carousel back to home position using the above example? Or can it only be run linearly from start to finish?

There are a million ways to skin a cat, one way no better or worse than the other. But having seen things like this first hand, I'm glad I have the facility to call smaller M codes to fix the rare occasion of an incomplete tool change.
Last edit: 23 Oct 2018 11:46 by Nitram.

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

More
23 Oct 2018 11:51 #119258 by COlger81
Replied by COlger81 on topic Fadal Retrofit - ATC cycle
Nitram, could you send your linuxcnc files?

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

More
23 Oct 2018 13:13 #119261 by andypugh
Replied by andypugh on topic Fadal Retrofit - ATC cycle

It gives me a "sys" is not defined. But in regards to the hall sensor line, it does not give any errors.


I am pretty sure that the Python script will give up entirely at that point.

Do you see the HAL pins appear?

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

More
23 Oct 2018 13:22 #119262 by rodw
Replied by rodw on topic Fadal Retrofit - ATC cycle
Pretty sure you need to add
 import sys
at the beginning of your file. I certainly had to on Windows as the output below shows
>>> sys.byteorder
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sys' is not defined
>>> import sys
>>> sys.byteorder
'little'
>>>

I'm still very much a noob with python

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

More
23 Oct 2018 21:37 #119291 by BigJohnT
Replied by BigJohnT on topic Fadal Retrofit - ATC cycle

For some strange reason, some basic python commands were not executing, for example; "sys.exit()"


Python does not randomly not execute code. If some bit of code is not executed then it is not being called.

JT

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

More
23 Oct 2018 22:20 #119296 by BigJohnT
Replied by BigJohnT on topic Fadal Retrofit - ATC cycle

I'm going through a retrofit of an AC Fadal 3016L. I have the mill running perfect with manual tool changes. I just started writing code for the non servo ATC in python. Is python the right method for the ATC or should i go with a different method?


You would get better exposure if you started your own thread in a more appropriate section like Advance Configuration. Most folks that come in this section are looking for Classicladder help or to answer Classicladder questions not Python.

JT

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

Time to create page: 0.085 seconds
Powered by Kunena Forum