My latest work project.

Started by YoDoug, July 10, 2025, 11:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YoDoug

Out of curiosity I uploaded the ABB Rapid programming language manual and the code that I wrote for this new cell to ChatGPT Pro. I didn't tell it, or give it any descriptions. I asked it to summarize the program and give a process flow and description with bullet points. Below is what it came up with. It really understands what is going on from the code.

High level program flow in HingeCell.mod
•   Global setup (top of module)
o   Declares position data (Home, PS1–PS5, LSAHome, ...), work objects PR1–PR5 and LS, and a large set of persistent flags such as LS1Call, LS1Return, Machine1LoadActive, etc.
o   Digital I/O and error handling strings are also defined.
o   These data items allow the same motion code to be reused for five pallet racks (numbered 1 100) and four load stations (LS1 LS4).
•   Support utilities
o   CheckAPI – waits (up to ~10 s) for the machine's Ethernet/API handshake; if absent it raises an error via ErrorOut.
o   ErrorOut – logs a string to the controller event log and terminates execution with Exit;.
o   Small I/O helpers: OpenGripper, CloseGripper, CycleStartM460, ManswerM460, LinkModeCheck, CloseDoorM460, CheckDoorUnlockM460, M460DoorOpenCheck.
o   RFID/pallet helpers:
�   ReadRFID turns on the reader, issues a reset/read sequence, waits for a tag, stores the value in Pno, then calls SetPno.
�   SetPno retrieves a calibration point (Pal_<nn>) for the scanned pallet and stores it in Point1.
�   PRackSet maps the pallet number range to the correct rack start point (PS1–PS5) and work object PR1–PR5.
•   Motion primitives
o   PickPalRack – goes to Home, moves to the rack start point, approaches the pallet (Confl\off; ConfJ\off; for unrestricted configuration), grips, retracts, and returns to Home.
o   PutPalRack – symmetrical sequence that deposits a pallet and then re reads the RFID tag for verification.
o   LSCall – drives to a load station, drops off a pallet and retreats.
o   LSReturn – retrieves a pallet from a load station and brings it back to Home.
•   Main routine (PROC Main)
1.   Cold start housekeeping – resets all door/lock/handshake outputs with Reset instructions .
2.   Enters an infinite loop at label ResetMain:
�   Verifies API connectivity (CheckAPI).
�   Clears all "active/return/call" flags for LS1 LS4.
3.   Machine M460 5X interaction
�   Load cycle (IN_M460_5X_M181 = 1)
�   Confirms "Link Mode", vacant work zone, pallet number range, etc.
�   Unlocks and opens the machine door, waits for DoorOpenProx, performs PickPalRack, closes and locks the door, then pulses CycleStart.
�   Unload cycle (IN_M460_5X_M182 = 1)
�   Mirror of the load sequence: door open → PutPalRack → door close → cycle start.
4.   Load station A logic (LSAExecute = 1)
�   Locks the physical cell gate, checks which of LS1/LS2 is requesting service (LSxCall / LSxReturn flags) and executes LSCall or LSReturn accordingly.
�   When both stations are idle the LSAExecute flag is cleared.
5.   Load station B logic (LSBExecute = 1) – identical flow for LS3/LS4.
6.   Loop reset – at the bottom of the routine all locks are released, then control jumps back to ResetMain: for the next cycle.
•   Error handling philosophy
o   Every wait loop has a fixed retry counter (typically 10–50 cycles of 0.25 s).
o   On timeout the helper raises ErrorOut, which logs and issues an Exit;, returning control to the robot's task level cycle handler.
o   Machine and door operations therefore fail fast and never block the robot indefinitely.
•   Typical sequence timing
1.   Robot idle at Home.
2.   PLC sets M181 → robot performs load in sequence (≈ 30 s).
3.   Machine runs autonomously; robot waits.
4.   PLC sets M182 → robot performs unload sequence and deposits finished pallet.
5.   Any LS requests are serviced in parallel whenever their execute flag is raised.
6.   Loop repeats.
This architecture cleanly separates machine service, pallet logistics, and load station servicing into small, reusable RAPID procedures while maintaining a single, easy to follow main loop.

"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Kyle F

DAMN doug,.... this is quite a setup.
Very nice and as others have stated, you must be a real VIP!

If you don't mind me asking, what kind of work are you putting through these cells? I would imagine production/high quantity

YoDoug

Quote from: Kyle F on July 11, 2025, 10:40 AMDAMN doug,.... this is quite a setup.
Very nice and as others have stated, you must be a real VIP!

If you don't mind me asking, what kind of work are you putting through these cells? I would imagine production/high quantity

Very high mix, low production. Some pallets only run a few times a week. Others run a few times a day. The main accessory drive plate in the pic below is one of the parts that will go through the machine. Between our two brands we have about 30 different versions of those plates plus other brackets and misc car parts.

Like Like x 1 View List
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Incogneeto

Quote from: Kyle F on July 11, 2025, 10:40 AMDAMN doug,.... this is quite a setup.
Very nice and as others have stated, you must be a real VEGAN?

If you don't mind me asking, what kind of work are you putting through these cells? I would imagine production/high quantity
Fixed.

It's ok Kyle you don't have to ask... :D

He will tell you. 8)

Kyle F

Quote from: YoDoug on July 11, 2025, 10:46 AMVery high mix, low production. Some pallets only run a few times a week. Others run a few times a day. The main accessory drive plate in the pic below is one of the parts that will go through the machine. Between our two brands we have about 30 different versions of those plates plus other brackets and misc car parts.

very nice!

Quote from: Incogneeto on July 11, 2025, 10:48 AMIt's ok Kyle you don't have to ask... :D

He will tell you. 8)

haha seems like you're tellin me!
nice to have some diversity in the workplace  ;D

YoDoug

Quote from: Kyle F on July 11, 2025, 11:24 AMnice to have some diversity in the workplace 


LOL, I'm a diversity hire!
Funny Funny x 3 View List
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Incogneeto

Quote from: YoDoug on July 11, 2025, 12:19 PMLOL, I'm a diversity hire!

And you are Extremely Qualified.!!

I'm betting you dream about these in your sleep.

You really do have a dream job.

I'm assuming they treat you well , Cause your skills are Top level. ;D

Kyle F

Quote from: YoDoug on July 11, 2025, 12:19 PMLOL, I'm a diversity hire!

same! got my 10+year vegan card now  8)

Incogneeto

Quote from: Kyle F on July 11, 2025, 01:56 PMsame! got my 10+year vegan card now  8)

OHHH You're Fooked!!!


Are you from Kentucky?? :D

Kyle F

Quote from: Incogneeto on July 11, 2025, 02:05 PMOHHH You're Fooked!!!


Are you from Kentucky?? :D

born n raised in central Tx!
-austin