Hi,
I have an application where I have three Epson 6 Axis robots (C4) working in the same space, I have programed Epson Robots before, so I have some background, but this time I need to create a smart enough program to make my application efficient...long story short, Can some one take a look in my code and make some recommendation to ensure I have a stable program... I am using Cases inside a Do Cycle, but I wonder is there is a best way.
Epson SPEL best Programming practices
-
ControlsGuy -
January 16, 2019 at 7:44 PM -
Thread is marked as Resolved.
-
-
hi
I dont see your code
did you post it ? -
Now I'm also curious to see this code
-
I am sorry for not answer sooner I am new in this forum... somehow I missed your message, but I think I got it now.
I can share my project, but you will need EPSON RC+ to open it, so I upload the main two parts as TXT
Let me know what you think
-
Hi
First of all, if it is stable dont touch itBy the way You can use any text editor even if it is a .prg .
I would like to see the main.prg. I'm assuming the two functions you posted are XQT ?
Anyway going back to your original question , what your problem ? Everybody programs differently, I've never done a program using case like that. UUsuakky my Cases are used when i build some kind of database where on each case i write data for each component. I dont see anything wrong with what you have but for example
Do you need to GSet Robot_1_GUI.R1_Step_TxtBox.Text, "xx" on every step ? On my robot if I write every step the run window will kill the processing time tring to show every line
Again, i dont see anything wrong, I will never program it like that but it just my personal judgement
Also to give you more input, please describe the application -
Hi Fabian,
My application is made of 4 robots, 3 of them are C4 and one is a RS4 plus 4 Epson cameras (cameras programs are not in my code yet) the three C4 are going to Pick->Inspect->Reject or Place. After the picked part is placed in the back tray some process is going to be done to it, when this Pick->Inspection->Place cycle have been done several times and my back tray is full the RS4 robot will pick this full tray and put it in the next station, picking a empty tray in his way back (this RS4 robot is not in my code yet).
Robot_1.prg is program that I have use before for simple pick and place application, the variable R1_RequestedOperation used to be generated by the PLC and R1_ActiveOperation, R1_CptOperation, used to be my way to tell the PLC what was going on with the robot. The function R1_MotionControl calls the different functions that move the robot. The limitation of this code is that the sequence of steps is generated by the PLC, so the robot is not making any decisions.
Since we have a more complex application this time we decide that the best way to resolve it is to make the robots as much independent from the PLC as possible, so I decide to add another program that runs “on top” or Robot_1.prg, this program is R1_StepControl.prg this programs feeds the “numbers” needed by Robot_1.prg to accomplish the motion sequence. And is here where I need advice. I am not sure is the way that I set up all this is ok or do I need to do changes.
The GUI part is just to simulate the missing PLC, since the machine is not ready for me to play with it. The GUI(display of text) will not be part of the final version of the software.
I don’t have a problem so far since I am still running in the simulator, the machine will ready probably in a month or so, but I am pretty sure I will have many problems when the machine is ready for my to download my code ?
I guess what I need is an opinion/advice about what will be a good way to program this application I am using cases because I am really used to program PLC and PLC’s are really good doing sequential applications so I am trying to setup my application this way (sequentially), but not sure if this will be my best approach.