custom hal component failed to compile, undeclared (first use in this function)

More
3 years 10 months ago - 3 years 10 months ago #260675 by rodw
No need to write estop components.
The estop_latch component allows you to  build an estop chain in software using muliple instances
linuxcnc.org/docs/2.9/html/man/man9/estop_latch.9.html
There is an example here
forum.linuxcnc.org/47-hal-examples/25861-external-e-stop
I find its easiest to sketch out the estop-latch components in the chain before writing your hal file.
So if you had 1 estop button and say fault sensors for air, lube and a door switch, each fault would be connected to its own estop_latch fault-in and if any one is triggered, it breaks the chain and the machine will stop.
It would be safer to do it this way so you stay inside the Linuxcnc paradigm
 
Last edit: 3 years 10 months ago by rodw.

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

More
3 years 10 months ago #260693 by smc.collins
no I want 1 master estop control, period, writing that as multiples is just to many paths for failure. it's the illusion of safety through excess complexity. in my plan, ANY component sets a estop whether single or parallel ALL estop engages everywhere. your' making a chain of failures there.

Rodw, if you see any obvious errors in loigic or known no no's here with what I have, I am getting close. I did sucessfully operate the tool changer today and I decided to add more logic and fix a few nagging issue. Also included the error states, lots of those, the fatal errors disable the tool turret and set the estop actually. I also expanded the tool table in the turret code. it does work btw. for those who might be interested in how to implement a multi tool per station lathe turret.
Attachments:

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

More
3 years 9 months ago - 3 years 9 months ago #260817 by smc.collins
Last edit: 3 years 9 months ago by smc.collins.

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

More
3 years 9 months ago - 3 years 9 months ago #260818 by smc.collins
Last edit: 3 years 9 months ago by smc.collins.

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

More
3 years 9 months ago #260892 by smc.collins
more debugging, found a bunch of race conditions, memory leaks and some problems with shared variable, I don't think that one is my fault. anyways rewrote a bunch of logic, brought the code to the middle of the road for coding standards, given a few days to test and adding logic to job, I will release this a complete for broad use.

as always constructive criticism useful
Attachments:

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

More
3 years 9 months ago - 3 years 9 months ago #260970 by smc.collins
day 6, massive code cleanup, logic improvements, implemented what I think could be considered stair logic, and started creating a whole new program for running tool changers. I am working on creating functional blocks that can be assembled with a gui and assembled into a hal file and compiled with halcompile. my focus is cavemen simple type of code, short, sweet and clean. I have been carefully watching my execution times, looks VERY FAST, everything is implemented inside the component. keeps the hal file cleaner and make life simpler.

this hasn't been tested on real hardware yet, but it does pass every test my simulation machine sets and  I have made a few toolchanges with timeout problems in the last few days. so I changed some logic around and this appears to be working as intended now.

feedback appreciated, but the silence is deafening

 
Attachments:
Last edit: 3 years 9 months ago by smc.collins.

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

Time to create page: 0.154 seconds
Powered by Kunena Forum