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

More
10 Jan 2023 22:14 #261499 by smc.collins
almost home, found a few more me stupid bugs, and toolchanger is starting to work reliably. Will post updated file this week, and for my first program, this is long and complicated. phew

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

More
11 Jan 2023 19:25 - 11 Jan 2023 19:26 #261611 by smc.collins



and we have lift off !!!! code release later this week still watching for bugs, machine dry runs incoming for testing purposes. i should have just done this from the start and saved 2 months of time.

youtube.com/shorts/xpoxUDQfEvs?feature=share
Last edit: 11 Jan 2023 19:26 by smc.collins.

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

More
12 Jan 2023 17:24 - 12 Jan 2023 17:25 #261720 by smc.collins
performed 500 tool changes with not a single issue, HOWEVER use at you own risk if you do. the hal file documentation at the bottom needs updating, some params were changed around. I don't have time at the moment, and I plan to rewirte this with the new toolchanger code structure shortly. 
Attachments:
Last edit: 12 Jan 2023 17:25 by smc.collins.

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

More
30 Jan 2023 00:25 #263198 by Grotius
Hi just for info, documentation by chat ai :Sure, I can write documentation for the code you provided. However, it is important to note that this code is specific to a Cincinnati Millicron tool changer and its HAL (Hardware Abstraction Layer) component, and may not be applicable to other systems. Additionally, it is also important to have knowledge of the machine and the specific implementation it uses, such as the input and output signals and their connections.Here is a general overview of the documentation for the code:
  1. The code first loads the cinturnchanger real-time component and adds the servo-thread function to it.
  2. The timer settings for delays are implemented internally in the component and may require adjustment depending on the condition of the machine. These include the debounce time after the turret lock is on (unlocktimer), the delay from unlock to motor run (unlocktimer), the maximum runtime before the motor is forced off (motortimeout), and the settling time after the motor is off to ensure alignment of the turret (turretlock).
  3. The code then assigns input/output calls from the primary HAL to the cinturnchanger HAL file. It also comments out the manual tool changer HAL controls built by pnconf, if it was used to create the original HAL file.
  4. The code then assigns BCD (binary coded decimal) switches, alignment switch, and switches found on the back of the turret plunger piston.
  5. The code then assigns control solenoids for the turret, such as the motor solenoid and the unlock solenoid.
  6. Finally, the code provides a list of all available input and output parameters that can be monitored.
It's important to note that this code is for a specific machine, and if you are using different machine you need to check the inputs and outputs match with your machine.
For the c file, the ai can not read this chunk at once.

 

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

More
31 Jan 2023 03:30 #263290 by smc.collins
Chat AI was very instrumental in getting this going for sure, and none of the original code is left from chat AI. In fact this program needs a good bit of cleanup and pruning and some debugging, but it is working currently. It even detected a tool jamming the turret from locking and estopped the machine. eventually I will rewrite it I am busy working on other issues at the moment.
The following user(s) said Thank You: Grotius

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

More
31 Jan 2023 04:09 #263296 by rodw
ChatGPT is useful for some basic stuff and its been great for web site product listings.

You clearly can't trust it  with any engineering, I got 4 different answers when trying to size a servo drive for a plasma cutter.
I'm still fighting with it over another eample.
The following user(s) said Thank You: Grotius

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

More
03 Feb 2023 00:07 #263559 by smc.collins
the issue is the data set it operates on currently. It is difficult to get it to take in the appropriate weights. I find it UBER useful for math problems though.

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

More
03 Mar 2023 23:25 - 10 Mar 2023 02:11 #265810 by smc.collins
latest update, new filtering for BCD switches and new motor pulsing scheme to help deal with turret inertia overwhelming the strobe ram mechanism. occasionally turret mechanism will overshoot locking position and fault out and estop the machine. Also added strobe filtering and input to motor shut off. lots and lots of debugging, still more to go, getting more and more reliable. been busy with working on other software related issues.
Last edit: 10 Mar 2023 02:11 by smc.collins.

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

More
10 Mar 2023 02:14 #266251 by smc.collins
final version, cleaned up a lot of small bugs, a few code fall through conditions, changed the implementation of the turret drive logic to prevent shearing of the drive pin with excessively hard stops at high speed. Motor uses a time on off PW type configuration for the logic. on for .300 seconds off for .750, this is adjustable from hal as are most all of the variables. Also fixed a few run on conditions, fixed a few other bugs where occasionally the toolchange would report finished prior to being finished.

Enjoy if it helps you. It's working solid on my end.
Attachments:

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

Time to create page: 0.083 seconds
Powered by Kunena Forum