Download presentation
Presentation is loading. Please wait.
Published byAlina Chafee Modified over 9 years ago
1
Working With the GMF Cylindrical Robots Lessons with the Robot System and RC Programming Language
2
Fundamentals for Working With Robots During robot program development we must plan our motion paths Using Safe Points We use Safe Points for 3 reasons: They guide the arms safely through their work environments to effectively avoid obstacles They provide logical positions where velocity changes can be made effectively to control completion time while minimizing damage potential to arms and equipment They provide logical positions where program branching or program changes can be made with minimal effort
3
P-to-P Motion – Safe Programming Techniques: Only target end points are remembered. Paths taken while getting to a stored point will be forgotten! We can always approach goals (desired programmed points) in any safe way that allow us to find our targets – confident that the robot will forget any corrections we made as we approached the defined points. Therefore, when any satisfactory target point is saved, we only then insert extra (safe) points around the target to assure that we will approach and exit safely without damaging parts, fixtures, or the robot and without any slewing or jogging (typically by approaching target points by operating only a single Joint)
4
Studying the RC Language First of all it is a ‘rich’ but primitive control language A standard program block is: N000 G00 F8 Z0T-15000R0A0 [B0]S00 This block contains joint targets (geometry) and up to 6 special S-codes S-codes are used for program control, mathematical computation and other special actions or events Blocks also contain F (feed/speed) data Finally they all begun with a G-code describing function. Commonly this is G0 (assumed & not shown) meaning to move ‘optimally’ and stop at the desired geometry Other G-codes of interest are: G11, G12 (splining/smoothing codes), G1 (linear motion) and G98 which converts the blockline into a control code of up to 16 S-codes and no motion
5
Controlling Program Execution – using RC Primitives RC uses register arithmetic to control program flow! The Most Common Register codes: S01,n ‘clears’ (zeros) the value in register n Registers 0 – 63 can store numbers from -128 to 128 (±2 7 ) as integers Registers 64 – 95 can store numbers from -32768 to 32768 (±2 15 ) as integers S02,n,c places a constant of value c into register n S10,n adds 1 to value of register n (and compares the value of register n to zero) S11,n subtracts 1 from value of register n (and compares the value of register n to zero)
6
Additional RC S-codes For Flow Control Condition Test Codes – in addition to S10, S11 S12 n, c (performs: n + c)Compares sum to 0, sets flag for S13 n1,n2 (performs n1 + n2)Compares sum to 0, sets flag for S14 n1,n2 (performs n1 – n2)Compares sum to 0, sets flag for S17 n, cCompares Register n value to constant c, sets flag for S18 n1, n2Compares value in Reg. n1 to Reg. n2, sets flag for These compares are performed right before a branch code for control of program flow
7
Branching Codes – right after compare codes! They branch to a target set with a S97,a command S30 aUnconditional branch to prog. Seq S97 a S31 nBranch to seq. number (S97 a) equal to data in Reg. n S32 aBranch to Seq. a if condition Status “=“ bit is set S33 nBranch to Seq. a equal to data in Reg. n, if Cond. Status “=“ bit is set S34 aBranch to Seq. a if condition Status “=“ bit is cleared (not =!) S36 nBranch to Seq. a if condition Status “=“ or “>” bit is set S38 nBranch to Seq. a if condition Status “=“ or “<“ bit is set
8
Using Register/Compare Tools to alter program flow and loop: Common Looping Structures (in RC is limited to 2 types): Type 1: REPEAT … UNTIL structure execute a section of code once (always) and tests ‘at the end’ Typical Coding: N000 F8 Z0T-15000 R0A0[B0]S01, n /OR/ S02,n,x S0 Statements {Beginning of Looping Zone} N015 Z __ T__ R__ A__ [B __]S97,5 S10,n S0 { series of Statements to (possibly) Repeat} N0xx G98 S17,n,c e S38,5 S0 – the test code Statements that run after register reaches c e value Nzzz F8 Z0T-15000R0A0[B0] S99 The “End of Program” Symbol is S99
9
Looping Alternative Type 2: Do … While makes a test at the beginning of a section and only enters if skipping criteria is not met Typical Coding: N000 F8 Z0T-15000R0A0[B0] S01, n /OR/ S02,n,x S0 Statements {Beginning of Looping Zone} N015 G98 S97,5S17,n,c e S36,10 S0 Statements to (possibly) Repeat N0xx F6 Z __ T__R__A__[B __] S10,nS30,5S0{End of Looping Zone} N0xy F7 Z __ T__R__A__[B __] S97,10S0(Beginning of Alternative Action) Statements that run after register reaches c e value Nzzz Z0T-15000R0A0[B0]S99 note “End of Program” Symbol S99
10
Input/Output with the RC Control The RC controller supports an internal (Robot Device) I/O board RDO/RDI use S70 … S77 Typically use S70,1 and S71,1 to control robot end effectors (grippers!) S74, 75, 76, 77 focus on robot device input and branch or wait for response
11
Input/Output with the RC Control The controller also supports an external “Signal Device” interface (SDO/SDI) Output control is thru: S80,n and S81,n Outputs are sinking devices meaning that they make a connection (S80) or break a connection (S81) to controller ground to operate external devices We must provide a separate 24VDC power supply that is commoned to the control to operate devices or control communication circuits We connect all control/communication through isolation relays and make no direct connections from outside power systems through the I/O interface
12
Here we see the common wiring techniques with Relays for both output and Input with the RC SDI/SDO interface (Note: the SDO ports control the coil to change the relay state while SDI port monitor external voltage for a voltage value >3 vDC above Controller Ground indicates logic High)
13
Typical Control Circuit
14
Control reaction to SDI’s S85,n,a (SDI n is monitored)Conditional branch to Seq. # S97a if SDI n is “Logic High” that is ‘Turned On’ S86,n,a (SDI n is monitored) will continue in normal flow if SDI is logic high Timed Condition: Monitors SDI n for time specified in Parameter Data #10 for Logic High, if port stays low will branch to Seq # S97 a S87,n,a (SDI n is monitored) will continue in normal flow if SDI is logic low Timed Condition: Monitors SDI n for time specified in Parameter Data #10 for Logic Low, if port stays high will branch to Seq. # S97 a NOTE: If a = -1 in S86 or S87 the program will wait forever for logic hi or lo
15
Using SDI and SDO for Communication and Control (Non-Blocking Technique) N021 G98 S97,50 S80,1 S87,1,-1 S60,25 S0 This line starts a device connected thru SDO 1 relay, waits until SDI 1 goes logic low – note, S60,25 pauses the program for exactly 2.5 seconds N022 G98 S97,51 S86,1,75 S60,25 S81,1 S02,65,50 S0 This line waits for SDI 1 (input monitoring a photocell) to go logic hi (for time set in Para. 10), if Port goes Hi, delay 2.5 seconds then ‘turn off’ SDO 1 returning relay to normal stopping device, reset a counter and continue … Code Steps to Move part to table and return it to the cradle … N044Z__T__R__A__ S30,50 S00 After putting the part back in cradle clears to a safe position above pickup point and loops to line N021 note N21 contains S97,50 The next line is an error Subroutine for time tracking: N0zz G98 S97,75 S11,65 S32,99 S30,51 S0 - Jumps here if no part enters photocell area during the 2 second delay time (or amount of time stored in setting data register 10). Decrements counter register (#65) by one; Checks to see if Counter register has counted down to zero. If it has, branch to Target 99 (a “get help” or “go home” subroutine) else branch back to S97,51 on line N022
16
Focusing on Communication: We use a 2 Relay Feedback (Handshaking) Technique: Originator Turns on an SDO port causing a relay to switch state Receiver’s SDI port is wired to this relay in a N/O way After Receiver SDI goes on, it Turn on an SDO port to a 2 nd relay (acknowledge that they heard the message); receiver starts monitoring their SDI port for logic low Originator now is monitoring an SDI port for Logic Hi (Acknowledgement); after receiving ack. It turns its SDO port off and starts monitoring its SDI port for logic low This satisfies receiver waiting for the signal relay to return to normal (SDI is logic low) and they turn off their SDO acknowledge port. This satisfies originator waiting for the acknowledgment relay to return to normal (SDI goes logic low) and the robots continue on their separate ways with synchronized activities!
17
Communication Solution in R/C Originator Coding: N018 G98S80,3 S86,2,-1 S81,3 S87,2,-1 S0 Note: SDO on – Wait for Acknowledge on – SDO off – Wait for Acknowledge off Receiver Coding: N035G98S86,2,-1 S80,3 S87,2,-1 S81,3 S0 Note: Wait for Message – SDO Acknowledge On – Wait for Originator’s Message off – SDO Acknowledge Off
18
Programming the RC Control Remember Safe Programming Practices: Enter Safe points after targets are set! Register arithmetic and Comparison/Branching codes to direct flow: Palletizing/Sorting Timing Delays Counting Activities To Name a Few! SDO/SDI tools for communication and Control: SDO’s to make switches change on relays SDI’s to monitor switch changes on relays All electrical signals are mechanically isolated before they are brought into the controller’s I/O interface
19
Programming the RC Control There are many, many ways to accomplish program control – The programming suggestions here are good ones but for sure not the only ones! (there’s at least 50 ways to leave your lover! … With all due respect to Paul Simon …)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.