{"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/400","repository_url":"https://api.github.com/repos/MarlinFirmware/MarlinDev","labels_url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/400/comments","events_url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/400/events","html_url":"https://github.com/MarlinFirmware/MarlinDev/issues/400","id":147576779,"number":400,"title":"Architectural concept for Marlin objects","user":{"login":"CONSULitAS","id":6808242,"avatar_url":"https://avatars.githubusercontent.com/u/6808242?v=3","gravatar_id":"","url":"https://api.github.com/users/CONSULitAS","html_url":"https://github.com/CONSULitAS","followers_url":"https://api.github.com/users/CONSULitAS/followers","following_url":"https://api.github.com/users/CONSULitAS/following{/other_user}","gists_url":"https://api.github.com/users/CONSULitAS/gists{/gist_id}","starred_url":"https://api.github.com/users/CONSULitAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CONSULitAS/subscriptions","organizations_url":"https://api.github.com/users/CONSULitAS/orgs","repos_url":"https://api.github.com/users/CONSULitAS/repos","events_url":"https://api.github.com/users/CONSULitAS/events{/privacy}","received_events_url":"https://api.github.com/users/CONSULitAS/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/labels/Design%20Concept","name":"Design Concept","color":"bfe5bf"},{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/labels/Developers","name":"Developers","color":"FF77AA"},{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/labels/Hardware%20Support","name":"Hardware Support","color":"006b75"},{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/labels/Needs%20Discussion","name":"Needs Discussion","color":"fbca04"},{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/labels/Not%20a%20bug","name":"Not a bug","color":"e6e6e6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-11T22:45:32Z","updated_at":"2016-04-12T06:48:54Z","closed_at":null,"body":"Dear developers,\r\n@thinkyhead @jbrazio @Roxy-3DPrintBoard @MagoKimbra and others\r\n\r\non #395 we have a discussion about modules, objects and HAL.\r\n\r\nI would like to propose some \"first ideas\" for objects and invite you to contribute, so that we can sketch a **rough** architecture for the first steps.\r\n\r\nIdeas and thoughts for mapping parts of the robot to objects.\r\n\r\nNote: This is written like a class hierarchy, but not every level perhaps/sure will be an object and some are only properties, methods or hints.\r\n\r\n* Electronics\r\n  * Console\r\n    * Serial (mostly)\r\n    * but how about network or even web console?\r\n  * PersistentStorage (see https://github.com/MarlinFirmware/MarlinDev/issues/395#issuecomment-208025964)\r\n    * EEPROM (see #376)\r\n    * SD card\r\n    * I2C EEPROM (https://github.com/MarlinFirmware/Marlin/issues/626 for Due and others)\r\n    * punch cards (regards to @jbrazio 😄)\r\n  * Sensors\r\n    * Endstops (gives mechanical end postiion) -> HAL, you can abstract `Endstop.isHit();`\r\n      * physical\r\n        * mechanical/electronical\r\n      * calculated (former known as software endstops 😄)\r\n    * Reference switches (give zero position), poor makers often only have endstops, so they are used for reference, too\r\n    * probes (used for leveling or calibrating, e.g. ABL), poor makers often use ZMIN endstop as probe\r\n      * HAL: just check `Probe.isHit();` and the probe either tests its own hardware or just `EndstopZ.isHit();`\r\n    * temperature sensors (there is some HAL via thermistor tables)\r\n      * hotends\r\n      * bed\r\n  * switches\r\n    * Heaters\r\n      * hotends\r\n      * bed\r\n      * building room -> GCODE for setting build room temperature?\r\n    * fans\r\n      * object (standard fan for cooling freshly printed filament)\r\n      * hotends (e.g. for E3D)\r\n      * electronics (stepper drivers)\r\n      * build room (cooling closed build rooms if to hot? see heaters)\r\n    * light\r\n      * LEDs for status\r\n      * Illumination of building room\r\n  * displays\r\n    * different types and interfaces\r\n* board\r\n  * IO pins (called exactly like on silk screen of the board)\r\n    * D2, A1 and so on\r\n  * IO ports (called exactly like on silk screen of the board) -> RAMPS: X, Y, Z, E0, E1, \r\n    * use 2 to n IO pins\r\n    * stepper ports\r\n    * i2c port\r\n\r\n* mechanics\r\n  * objectspace\r\n    * size for building room (can be smaller than frame sizes, e.g. because of tilt, cleaning or tool positions)\r\n    * leveling methods (ABL, ...)\r\n      * probing\r\n      * transformation to frame coordinates \r\n    * movement\r\n      * target for G0/G1 and others\r\n      * tells `Frame.Axis` to move logically -> Transformation for ABL\r\n  * frame\r\n    * axis\r\n      * target for `Objectspace.Movement`\r\n      * tells corresponding actors to move physically -> HAL for different kinematics (Cartesian -> trivial, CoreXY, Delta, ...)\r\n    * sizes for physical movement\r\n    * current coordinates\r\n  * actors\r\n    * stepper (can differ from frame axis, e.g. CoreXY, Delta, Scara)\r\n      * ratio (aka steps per mm)\r\n      * use IO ports (e.g. RAMPS X->X, Y->Y, Z->Z1, E0->E, E2->Z2)\r\n    * servos\r\n    * selenoids (if used for moving)\r\n\r\n**Please keep in mind: We shall not and will not implement all this at once! But if we have the same big picture in mind - even with the visionary parts, we will make more flexible and compatible code.**\r\n\r\n**It is important to go on in small steps like explained in #395 . So we can learn and keep on the track.**\r\n\r\nI think i will update this with your ideas as an collection for the information in one place. Please provide hints to useful PRs and issues for reference, too."},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/comments/208734545","html_url":"https://github.com/MarlinFirmware/MarlinDev/issues/400#issuecomment-208734545","issue_url":"https://api.github.com/repos/MarlinFirmware/MarlinDev/issues/400","id":208734545,"user":{"login":"CONSULitAS","id":6808242,"avatar_url":"https://avatars.githubusercontent.com/u/6808242?v=3","gravatar_id":"","url":"https://api.github.com/users/CONSULitAS","html_url":"https://github.com/CONSULitAS","followers_url":"https://api.github.com/users/CONSULitAS/followers","following_url":"https://api.github.com/users/CONSULitAS/following{/other_user}","gists_url":"https://api.github.com/users/CONSULitAS/gists{/gist_id}","starred_url":"https://api.github.com/users/CONSULitAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CONSULitAS/subscriptions","organizations_url":"https://api.github.com/users/CONSULitAS/orgs","repos_url":"https://api.github.com/users/CONSULitAS/repos","events_url":"https://api.github.com/users/CONSULitAS/events{/privacy}","received_events_url":"https://api.github.com/users/CONSULitAS/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T06:48:53Z","updated_at":"2016-04-12T06:48:53Z","body":"@jbrazio \r\n>>calculated endstops\r\n\r\n>May I suggest \"virtual endstops\" ?\r\n\r\nGood idea. Will change it.\r\n\r\n>Whats you feeling about UML and diagrams ?\r\n\r\nFormal descriptions are great and i am sketching diagrams all the day.\r\n\r\nBut, perhaps UML is not common for all of us. And for a first discussion and collection of ideas i thought:\r\n\r\nKeep it simple, stupid."}}