Can you give me a code example in TP prog.
Posts by malain
-
-
Hi,
I have a problem with a situation that cause me a limit error. I understand what is the limit error, but I need a way to correct it. So here the situation.
Let say that we have 3 positions (P1, P2, P3)
P1 has a rotation (R) of 0 deg
P2 has a rotation (R) of 120 deg
P3 has a rotation (R) of 240 degThe program (in karel) send the robot to the position P1, after to the position P2, after to position P3 and return to P1, P2, P3, P1, ....
So,
to be able to pass from P1 to P2, the robot turn the joint 6 counter clock wise of 120deg (let say that J6 value = 120 deg)
to be able to pass from P2 to P3, the robot turn the joint 6 counter clock wise of another 120deg (J6 value = 240 deg)
to be able to pass from P2 to P3, the robot turn the joint 6 counter clock wise of another 120deg (J6 value = 360 deg)
because the robot try to reduce the angular displacement, when it's the time to go from P3 to P1, the joint 6 goes counter clock wise again for 120 deg...At some point, the joint 6 will get a limit error
My question is : How can i correct that?
-I don't want to manage it myself by always goes to an intermediate position between move that unwind the joint 6...or maybe is the only way to solve that
-The positions can't be teach others waysThanks for your help
-
Thanks for the code, this will save me the time to do this
-
Hi,
I know that I can do one by myself, but is there a command in KAREL to take a string and set all char to UPPER case or LOWER case
something like :
Mystr = 'AbCdEf'
Mystr = TOUPPER(Mystr) --now I got 'ABCDEF'
Mystr = TOLOWER(Mystr) --now I got 'abcdef' -
humm.... I'm embarrassed
thanks
-
Hi,
Is there a way to know the lenght of an array inn karel or if I have to keep it into a seperate INTEGER
abc : ARRAY[30] OF INTEGERexemple : LEN(ABC) ---this return 30
Or
Mayby something like FOR EACH in a Vbscript
total = 0
FOR EACH item IN abc DO
total = total + item
ENDFOR -
WOW... that make sense, I will give it a try!!!!
Thanks
-
127.0.0.1 is not a loop back address?... so that mean we are pinging the local host PC... not the vitual robot it self.
Maybe if you can answer the next question that will help me to understand:
What if you have 2 virtual robot in the same workcell. What is the IP adresse of each robot? -
Is there a way to hide global variable from the DATA screen of the TP.
Example :
PROGRAM test
VAR
Var_A : INTEGER --I want this one can be access from the DATA menu of the TP
Var_B : INTEGER -- I don't want to show this one in the DATA menu of the TP, but need to be global
BEGIN
--blablabal
END testThanks
-
Is there a way to connect a real PLC to virtual robot in RobotGuide.
Or maybe the question can be formulate like this : how to setup the IP address of a virtual robot the way that I can ping it from the host PC. Or better, ping it for a PC on the same network.
Thanks
-
And what about PATH. In karel there is a variable type (PATH) that do exactly what you need. I don't know if this type can be used in TeachProg
-
So here were I am (if someone need this information)
So yes I test it by using the web acces in Intouch and the result is not exactly what I need. I don't need the vison button and information about the pieces.
I also try to retreive the image from the MC card by using GET of the FTP command in windows and the approach seems good, but I will need to built a little program (maybe a batch file) that will:
- Connect to the robot (FTP xxx.xxx.xxx.xxx)
- Get the listing of the picture name (cd \mc:\vision\log\<the date>)
- Spot the last file (dir .........and some work to do.. this "dir" doesn't have all the option of the dir in windows)
- Copy this file locally on the PC (binary and get filename.abc
- Close the connection (close quit exit)
- Give to the HMI the path of the local file (some work to do here)It will work, but I was hoping a easier solution. So if someone has something else to suggest, i'm ready!!!!
-
Intouch is a HMI software from Wonderware.
Yes intouch can propably display the iRVison runtime (good idea, thanks). But I just need the picture, not all the button and information about the pieces. I found that I can log image on the MC card... but is there a way to acces the MC card files. Example : IPADDRESS/MC/file.png
-
Hi,
I use IRVISION (sony camera) and I want to display the image of the camera on a user interface (like Intouch). How can I get the live image to the interface? Any Idea?Thanks
-
Hi,
I want to know if there is a way to call a TPprog from KAREL and send some arguments to the TP progSomething like : CALL_PROG('PRG1',prgIndex,arg01, arg02, agr03)
The work arround I think about is to "load" arguments in TP registre (R[xxx]) before calling the TP prog and the TP prog use the value in these registers... it's ugly, but it works...
So is there a way to use arguments with the CALL_PROG
thanks
-
-
-
-
Hi,
How manage a error in the TP prog instead of letting the tp prog going to stop ?
Thanks
-