Disclaimer. Robots are very reliable guys. The average Robert of a normal brand can work like hell for years without interruption, requiring only short breaks for maintenance and calibration checks. All of the above is solely a consequence of the fact that we are trying to force these guys to do something they are not used to. Of course, it should be noted that we are trying to do this within the manuals, but, apparently, we are climbing into such wilds, where the function seems to be written, but it is not fully developed. In this connection, we grab all the joy that will be discussed later in the text. Long read article.
Welcome to the second part marlezonskogo ballet.
In the first one, we talked about how sick people are generally met on the territory of the Russian Federation, and today we will discuss what happens when you get very far under Robert's skirt.
Well, we haven't started yet — I have accumulated a lot of mixed information. There will be a post about entering the profession, there will be programming of microcontrollers, there will be miracles in the organization and management of the development process, and so on. In this regard, the hubs where the material will be published will float, so as not to clog the thematic areas with irrelevant information.
Now let's Go! (C) Yuri Gagarin.
What do we do?
As we discussed in the first part, Roberts is ideal in "dig from here to lunch" situations, when operations are standardized and he runs the same program in a loop.
But what if it isn't? What happens if we need to make a small series of 200 pieces? Load the complex for a week. And in a week — to put another product there. There is only one way out — figachit programs with handles, via the remote. I highlighted the inconvenience of this sacrament in a previous article.
Aggravate. What if there is only one product?
Let's take as an example the example provided by vakhramov with the milling of the boat hull. Not strong in shipbuilding (well, except for the welding of micro-panels, which in shipbuilding are called gulliverovskoe exclusively bullying for the sake of-it's duryndy a few meters and weighing hundreds of kg), but I can assume the following TK:
- We have a CAD model of the boat's hull.
- We have a nonfig-sized cube made of something that is being milled.
- We want to poke a button, and the software will create magic, and the robot itself from the cube (or parallelepiped) we have something milled and verified.
Actually, the problem is just typical for us (we didn't solve it specifically). There is a 3D model, there is a blank and Robert on the moving system. We need to create a program for it in the machine, check its execution in real time, run the scanner and compare the expectation and reality and finish something, and voila.
We will talk about programming, the nuances of 3D analysis, the inverse kinematics problem, the formation of control programs, and scanners and cameras much later. It is clear that this task is not trivial, and we, smearing tears of happiness with our sleeves, plunge into the process. But, like a quarrelsome young lady, Robert proudly raises his proboscis, and asks:
— Why all the attention to these programs of yours? Why are you just doing something there? What about me? Did they do me for nothing?
Well, it throws out a lot of features. Which we will talk about.
The first thing that awaits us on the way to communicate with Robert. The fact that the program for one-handed you can write in two principal types of coordinates: Cartesian, and the JDC. The first is the XYZ position and rotations around each of the axes. The second is to specify the installation angles of each of the axes, at which the condition for placing the trunk in space is met. The first are translated into the second and back quite correctly inside the controller itself. Another thing is if you accidentally decide that this is definitely the same story, decide to work in Cartesian. Hi, bipolarity singularity!
In General, a singularity is a state of mind of an iron friend, in which the speed of the motor on any of the axes exceeds the constructive one. Not quite clear, I'll try to explain.
When Robert moves his hand from point A to point B, he has two options. Or-set the speed for all motors evenly. In this case, the speed of each specific motor is equal to the required angle of rotation of a specific axis, divided by the time of movement. If this mode is selected, the robot writes beautiful arcs as it moves between points. It is a pity, but in the process of this movement, he does not go in a straight line, but as it is convenient for him. As a result, we have a non-illusory chance to come with a trunk to the product/walls/others like it.
Linear motion guarantees that it will travel strictly in a straight line. But at the same time, the motors need to work at different speeds at different time intervals. And if this speed exceeds the one that the engines can physically squeeze out of their winding soul, the robot writes "singularity". And all. The program stops.
The situation is slightly better in cases where coordinates are specified in joules instead of Cartesian coordinates. I don't quite understand why the controller reacts to points in jpoints somewhat differently than in Cartesian — maybe this is due to the logic of converting coordinates to angles. But in General, "maybe" is a magic phrase in robotics, it helps a lot in work and is used as a universal plantain.
However, even linear movement between points that are written in corners instead of coordinates does not guarantee that this will oblige the robot to drive along them. Fanuk made a special instruction for this, and YASKAWA generally declares that their robots do not play singularity. Both approaches don't work. With askaway — if you think about it in the essence of this phenomenon — in General, like trying to get around physics. The panel does not show the "singularity" label, but it informs you about speeding on some axis. How does this differ from a singularity? Nothing. The fans have a special team. WIRSJ, if I remember correctly (it was a long time ago and didn't work, because they forgot). Well yes. The robot continues to drive. Only in the process of movement, "kneads the numb hand", making the final joints of the movement, so beloved by programmers when typing - to twist the wrist. The consequences of swinging, if Robert has a cutter or laser head in his hand, are very funny, but scary. Therefore, the singularity must be taken into account.
Let's say we've dealt with this story. Let's say we figured out the nuances of recording up in the corners of the fanuk's joints and model — dependent pulses in yaskava's. And now we need to push the program into the robot. You can, of course, take a flash drive and a worker who proudly walks with it to Robert, but we are talking about automation in its purest form? Therefore, we need to send the program to the iron friend. Direct memory access is missing as a class, but we, restless, left such a thing as FTP. It seems that everything is cool, connect and go. But no. The robot can only play the client.
In fact, this function is used to pick up the up from the file washer of the enterprise network, upload it to the robot and execute it. The robot is a very modern thing, because the amount of memory in it is calculated in megabytes, and the Cuban barons swallow tears of despair, counting the cost of 1 byte and looking at their children's sandbox with white powder. In this connection-on Robert to store a thousand up will not work-the memory will say "Oh everything". And if we have a lot of programs — be kind to get on the file washer with a remote control and Hooray: just a couple of minutes, and he, shaking the program on Dial-up, reports about readiness for work.
Well, if chaos can't be defeated — it must be led. Oblige Robert to upload the file via FTP. To do this, it needs to specify the file name (or always place a file with the same name in a folder). To do this, what do you need? Write a program for Robert that will wait for the download command in the background and load the program. And then execute. For this YASKAWA offers us to buy the development environment and to deal with internal sandbox, which takes the written in C program. The syntax is, of course, C, but with the constructions there everything is not so obvious and very poorly (because it is new, already 2 years old) documented. And technical support in Deutschland, and help is not in a hurry.
Fanuk didn't go far here. The development environment also needs to be purchased, at the same time buying an additional option. In Fanuc, every sneeze is an option. The list of this joy is truly impressive, and the cost can cause an Allergy to yellow in the accounting Department. But-everyone earns as much as they can.
They wrote it and launched it. Even work. 5 times. And then he swears about the lack of memory, because your programs are long-this is fu. Three times. We swear, we go to finish deleting. Debarim. And at some point, Robert stops responding over the network. Why all this? But because it keeps the connection and does not know how to reconnect. Did the server slow down? Please rebut the food. Put a break? Dovedale, reboot the power. In all the time we've been working, we haven't found a way to resurrect the connection from Robert's side, and the resounding click of the switch was an obituary for every debugging session.
Have you debugged, finished, and wiped your work sweat? Robert is in position, the cube is ready for filing, the cutter is running and sharpening his teeth in impatience? Hooray? Are you sure?
The coordinates of the point are specified with an accuracy of 1 thousandth of mm. Robert can walk with an accuracy of 1 hundred. Hypothetical. Plus-minus. But still impressive! But what is this precision?
This accuracy is about repeatability. Repeatability of Robert's arrival at a point in space 100 thousand times. But if you suddenly decide to move Robert by 1000 mm, it won't be 1000 mm. Never mind. At least Robert is normal and not a wing of an aircraft value. Why?
The fact is that Robert has a virtual model inside of him. He doesn't know how to view his guts on the display inside the skull like a terminator, but he uses this set of numbers describing the size of each joint to convert from Cartesian to joules. In fact, for Robert Cartesian coordinates — just unknown game, whose name is "pure abstraction". All the driver can do inside the controller is turn each of Robert's 6 motors at a certain angle. And in order to convert from Descartes to points, and use the same constants that denote the size of the joints. And at the factory where they pour, sharpen and saw the details of future oppressors of the human race, there are also tolerances. Now imagine what kind of error can bring a shift in the size of one of the joints by, say, 0.5 mm.
So it turns out that the controller considers everything correctly, but is based on inaccurate data. On a run-out of a meter, we measured a spread of 1.5 mm at a completely new fanuk, which was never familiar with the walls. There are even special guys who come and use complex rides with measuring equipment in the entire availability zone to make either adjustment tables, or — adjust these values in Robert's guts. Again, in the classic application, this is not necessary-the operator brought the robot to several points, checked the accuracy and asked it to repeat this for the next 5 years. Errors do not play a role here — the robot loses its ability to grow, no matter how much you pour into it, immediately after leaving the factory. And to bend the geometry of the piece of iron, it must be sooooooooooooooo… I don't think that it will be able to work in principle after such loads. But we need it, and we have to solve this problem.
... not at all. If you want to ask Robert for his current coordinates, the position of the motors, or the line of the executable program, the oblomingo bird arrives and joyfully begins to hint that it would be nice to continue Smoking manuals and learning programming. If necessary, write it.
I don't mind — but I don't think I want to get Robert's passport and apartment keys. It seems to be a standard thing. Although, in General, I may not be aware of the logic of the creators of these restrictions, who turned Ethernet into a one-way bridge — it is quite possible that this is due to security.
I decided so
Another feature bug that occurs on both manufacturers. So tell me druh, how is it that if J6 is twisted in -210, and I ask you to turn in +240 degrees, you do it on the shortest path and spit errors? That's about how you start communicating with him when you face this trouble. Robert, if you specify the exact value in joules, does not go -210->0->>+240, and just from -210 turns to the side, which is equal to +240. We get in fact -380 (which is equal to + 240) - and voila, the limit of error, galaktega in danger.
And there is no clear pattern-sometimes from -185 to +180 goes correctly, and sometimes-from -165 to +175 can go wrong. Why this damn optimization is not clear, but the program has to be written by inserting a point at which the axis is set to zero. And if the technical process you turned it for ±180, then add another ±90, because otherwise it will break again on the shortest path. Relevant for the 4th and 6th axes.
Sysadmins have a tambourine? They're weak! A robot driver does not appear before the face of a piece of iron without sprinkling it with Holy water, without hanging the legs of chickens and rabbits, without putting a Buffalo skull on his head, and without letting go, like shurikens, a dozen horseshoes from his hands.
I stopped being surprised by the "seven troubles — one reset" rule. This switch is already native to me, dog, has become. I'm not surprised by the "why" and "because" answers. But some things continue to deliver. For example, the calibration system for tracking the weld seam, after which Robert can start to drive towards. Or backups that don't deploy. Or the comments "%another shit % flew off". Or absolutely randomly working native rounding paths. This has become the norm.
Instead of a conclusion
I do not encourage you to evaluate my words as whining. Like, " Oh, how hard it is to live with them." Despite their quirks, these very funny animals bring a lot of joy. And breaking through the thorns of poorly documented functions and snatching miracles on seemingly standard things says only one thing — when developing scripts, these issues were not given due attention. And in General, what daily use depends on works perfectly.
The emergence of new technologies will inevitably lead to the fact that Roberts will become more friendly towards the developer, and the current dances with a tambourine will gradually become a thing of the past. They change, however, not as quickly as we would like. In terms of conservatism, they are galloping ahead of the evolution of sharks, but not up to the speed of the reforms of the British Parliament. You just need to wait, and today-learn to bypass these annoying restrictions and cute oddities.
Next time we'll talk about the threshold for entering the profession, and then we'll look at the features of the implementation of na .NET import of CAD models. Or the details of the scanning surface. All — on the example of a boat made of a cube. We have to cut it down.