Something greater than zero is needed, however, ai think programmed wait instructions also satisfy the scheduling needs.
Posts by Erik Olsen
-
-
User ps0f0r made a few comments regarding the $MOR_GRP system variables and their questionable usefulness in this thread here:
ThreadFANUC PROJECT: Data recording with background Karel program
Hello,
I'm working on a Karel program inspired by the "Data Recorder" function available on collaborative robots made by KUKA (LBR iiwa):
Look the Kuka Data Recorder documentation page 423
In fact, it seems that there is anything comparable on FANUC robots, particularly on there collaborative robots where it will be very interesting to have a data (log) recording for risk assessment (for example).
I'm working on CR-35iA (with R-30iB controller), a 6-axis collaborative robot made by FANUC.
I looked…AxillusAugust 12, 2019 at 5:56 PM It seems like most people get around the issue by using variables for motor current rather than torque, these current variables can be found in the same thread.
-
watch the video, even with a simple movement there is a large shift. I assure you the code is correct (I will send it tomorrow).
The video Attached didn't really show the issue. From what I could see, you jogged the robot around in tool mode a little bit, and it correctly moved around your TCP, and then you used MOVE_TO to get back to one of your TCP teaching points. This MOVE_TO is a joint motion, not linear, and as a result, the robot dipped the tool a bit on the way back to the point.
As PDL, said the code would be nice, you may also want to verify that the robot mastering and TCP teaching were done correctly. For instance, if you use the 4 point method to teach TCP, what kind of error are you getting?
-
Most Fanuc robots have an 8msec scan time. My guess is you are too close to that edge that occasionally you get an extra scan.
I wouldnt expect a delay function to be deterministic down to the exact msec.
What happens if you set delay to 10?
Am I completely misinterpreting this section of the Karel manual, or is Fanuc outright saying there is an extra 8msec delay every 250ms (by default) on top of the actual scan cycle.
I'm not sure how often op is seeing this extra delay(the x-axis of his graph seems to imply it's more often than every 250ms)Ops graph shows the extra delay is happening every 96ms, but maybe his controller has a different default %Delay value or this is part of it? Please let me know if I'm being an idiot and not understanding the manual here though. -
For everybody else with the same issue, we ordered an E-stop Unit from FANUC for around 400 Euros and received after a couple of days.
The swap took 10 minutes and all errors disappeared.
The manual suggested swapping the E-stop Unit for some of the errors, but it could not be deducted if all of the errors had a connection to this. Fortunately, they did.Thanks to C_hiney.
Thanks for coming back here with the solution.
-
There are many forum posts on this topic already, but the short answer is that by default U-frames are saved in Matrix representation rather than cartesian. The NOAL values you are seeing are part of the 4x4 matrix. To save a userframe to a PR in cartesian you need to set the system variable $PRCARTREP=1
Here's another thread:
variable Position register representation
-
I'm not super familiar with the workflow for Sprutcam, so I have some questions for you that might help solve your issue.
Do you know if changing the cutter/tooling changes the UTOOL/Tool frame values in sprutcam or does it actually offset the toolpath (and thus the .TP point positions after the post-processing)? If it only changes the UTOOL values (which is suspect it does) then you will need to change/update the utool value on the actual robot as well. The .TP programs do not contain any actual frame/tool position data, they just select which tool and frame the robot should use.
Many finished robot machining applications that utilize tool paths generated from CAD/CAM like sprut or Mastercam/robot master will also have the robot automatically "search" or calibrate and update the Utool values with something like a through-beam sensor or tool length touch-off, as the real-world setup rarely matches your cam config.
-
Can a compact controller even perform a hot start? I thought the only way to power cycle them was with the controller breaker?
-
I am a bit surprised Fanuc recommended that as the Karel solution rather than just using Karel to rename the files in the log directory itself.
-
MENU>6 SYSTEM>1 CLOCK>[F2] "ADV"
Should bring up the advanced clock settings including NTP server settings. I've personally never used it so sorry if this isn't what you were looking for.
-
Did you ever get a response from fanuc? I'm having a similar issue currently where I've lost all Utools past UT:10
Nothing Useful. I can't recall if we ended up just reverting to an earlier backup and losing the work, or If I created a new cell and imported everything but the UTools into it, but I think both would have fixed my original issue.
I will say, If you lost all UTOOLs after 10 at the same time it sounds like it may be a different issue. What is the value of $SCR.$MAXNUMUTOOL on your robot?
-
Click on the triangle on your TP. This will provide you with more detailed information.
Could e.g. be the maintenance reminder or missing payload data.
For non-touchscreen pendants, you can also press the i button on the pendant to bring up the same notifications.
-
Thank you very much for your precise answer , but in the obtained file some values are saved as * as in the attached file from you .
So do you have any idea how to extract the value correctly?
And do you have any idea which variables I should use to extract or save the speed of the motors or encoders and the speed of the joints ?
There is a Karel Reference manual you can get off of the Fanuc portal/Fanuc CRC that will be a lot of help for this sort of thing, but the asterisks are caused by the "length" parameters you used when converting the variables to strings.
According to the Karel Reference the CNV_REAL_STR built-in procedure:
Quote- length specifies the minimum length of the target. The actual length of target may be greater if required to contain the contents of source and at least one leading blank
- If the declared length of target is not large enough to contain source with one leading blank, target is returned with one leading blank and the rest of its declared length filled "*" (asterisks).
In these lines
You set the length of IntANGa3Str (target) to 2. The actaul sorruce values used when running your program were these:
1.358 fits because there is only one character to the right of the decimal, this character plus the "leading space" equals a length of 2.
-94.739 obviously doesnt fit into the length of 2 after you add the leading space.
However, -1.285 and especially -.417 (-0.417) are a bit tricky. I think they do not fit because the - signing plus the digit to the right take up 2 characters. Regardless of how this all actually works. Using 0 for the length parameter cleared up the issue for me.
-
Yes I tried to run the program without the part of torque, but it didn't work
I would try again and make sure you remove/comment out where you write the torque to the log file. I was able to run your program and make a valid angle log using the following code:
Code
Display MorePROGRAM dataextract %COMMENT = 'LOG DATA RECORD' %SYSTEM %NOLOCKGROUP %NOABORT=ERROR+COMMAND+TPENABLE %NOPAUSE=ERROR+COMMAND+TPENABLE %NOPAUSESHFT VAR logFile : FILE filename : STRING[16] duration : INTEGER clock_var : INTEGER period : INTEGER timeInt : INTEGER timeStr : STRING[18] IntANGa1,IntANGa2,IntANGa3,IntANGa4,IntANGa5,IntANGa6 : REAL IntANGa1Str, IntANGa2Str, IntANGa3Str,IntANGa4Str, IntANGa5Str, IntANGa6Str: STRING[4] entry : INTEGER status : INTEGER test : INTEGER clocky : INTEGER -- routine to get angle of axis ROUTINE GET_INT_ANG(active : BOOLEAN) BEGIN IF active=TRUE THEN GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[1]', IntANGa1, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[2]', IntANGa2, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[3]', IntANGa3, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[4]', IntANGa4, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[5]', IntANGa5, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[6]', IntANGa6, status) ENDIF END GET_INT_ANG -- main routine BEGIN -- execute the program clock_var = 0 -- begin the clock time count CONNECT TIMER TO clock_var period = 10 -- ms duration = 100000000 -- ms filename = 'UD1:\'+'Test'+'.txt' entry = 0 status = 0 -- tests test = 0 clocky = 0 -- get actual time and convert it into string GET_TIME(timeInt) CNV_TIME_STR(timeInt, timeStr) -- open the log file OPEN FILE logFile ('AP', filename) -- write actual time and make a carriage return WRITE logFile (timeStr, CR) REPEAT -- start recording clocky = clock_var test = clocky+period GET_INT_ANG(TRUE) -- call internal angle routine CNV_REAL_STR(IntANGa1, 2, 2, IntANGa1Str) CNV_REAL_STR(IntANGa2, 2, 2, IntANGa2Str) CNV_REAL_STR(IntANGa3, 2, 2, IntANGa3Str) CNV_REAL_STR(IntANGa4, 2, 2, IntANGa4Str) CNV_REAL_STR(IntANGa5, 2, 2, IntANGa5Str) CNV_REAL_STR(IntANGa6, 2, 2, IntANGa6Str) WRITE logFile(clock_var) WRITE logFile(';') WRITE logFile(';') WRITE logFile(IntANGa1Str,CR) WRITE logFile(IntANGa2Str,CR) WRITE logFile(IntANGa3Str,CR) WRITE logFile(IntANGa4Str,CR) WRITE logFile(IntANGa5Str,CR) WRITE logFile(IntANGa6Str,CR) DELAY(period) UNTIL DOUT[101]=OFF -- stop recording, close log file CLOSE FILE logFile END dataextract
If you still want to log the $CUR_TORQUE, $TORQUE or $MAX_TORQUE Variables you need to use the correct DATA types. These system variables are stored as SHORT data types and your GET_VAR instructions were trying to write into REAL variables. SHORT data needs to be assigned to BYTE or INTEGER variables. After changing your data types and a couple of CNV instructions I was able to make a valid log containing both Angle and CUR_TORQUE values:
Code
Display MorePROGRAM dataextract %COMMENT = 'LOG DATA RECORD' %SYSTEM %NOLOCKGROUP %NOABORT=ERROR+COMMAND+TPENABLE %NOPAUSE=ERROR+COMMAND+TPENABLE %NOPAUSESHFT VAR logFile : FILE filename : STRING[16] duration : INTEGER clock_var : INTEGER period : INTEGER timeInt : INTEGER timeStr : STRING[18] IntTQa1,IntTQa2,IntTQa3,IntTQa4,IntTQa5,IntTQa6 : INTEGER IntTQa1Str,IntTQa2Str,IntTQa3Str,IntTQa4Str,IntTQa5Str,IntTQa6Str : STRING[4] IntANGa1,IntANGa2,IntANGa3,IntANGa4,IntANGa5,IntANGa6 : REAL IntANGa1Str, IntANGa2Str, IntANGa3Str,IntANGa4Str, IntANGa5Str, IntANGa6Str: STRING[4] entry : INTEGER status : INTEGER test : INTEGER clocky : INTEGER -- routine to get angle of axis ROUTINE GET_INT_ANG(active : BOOLEAN) BEGIN IF active=TRUE THEN GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[1]', IntANGa1, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[2]', IntANGa2, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[3]', IntANGa3, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[4]', IntANGa4, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[5]', IntANGa5, status) GET_VAR(entry, '*SYSTEM*', '$MOR_GRP_SV[1].$CUR_SV_ANG[6]', IntANGa6, status) ENDIF END GET_INT_ANG -- main routine BEGIN -- execute the program clock_var = 0 -- begin the clock time count CONNECT TIMER TO clock_var period = 10 -- ms duration = 100000000 -- ms filename = 'UD1:\'+'Test'+'.txt' entry = 0 status = 0 -- tests test = 0 clocky = 0 -- get actual time and convert it into string GET_TIME(timeInt) CNV_TIME_STR(timeInt, timeStr) -- open the log file OPEN FILE logFile ('AP', filename) -- write actual time and make a carriage return WRITE logFile (timeStr, CR) REPEAT -- start recording clocky = clock_var test = clocky+period GET_INT_TQ(TRUE) -- call internal torque routine CNV_INT_STR(IntTQa1, 2, 2, IntTQa1Str) CNV_INT_STR(IntTQa2, 2, 2, IntTQa2Str) CNV_INT_STR(IntTQa3, 2, 2, IntTQa3Str) CNV_INT_STR(IntTQa4, 2, 2, IntTQa4Str) CNV_INT_STR(IntTQa5, 2, 2, IntTQa5Str) CNV_INT_STR(IntTQa6, 2, 2, IntTQa6Str) GET_INT_ANG(TRUE) -- call internal angle routine CNV_REAL_STR(IntANGa1, 2, 2, IntANGa1Str) CNV_REAL_STR(IntANGa2, 2, 2, IntANGa2Str) CNV_REAL_STR(IntANGa3, 2, 2, IntANGa3Str) CNV_REAL_STR(IntANGa4, 2, 2, IntANGa4Str) CNV_REAL_STR(IntANGa5, 2, 2, IntANGa5Str) CNV_REAL_STR(IntANGa6, 2, 2, IntANGa6Str) WRITE logFile(clock_var) WRITE logFile('TOR;') --WRITE logFile(IntTQa1,CR) WRITE logFile(IntTQa1Str,CR) WRITE logFile(IntTQa2Str,CR) WRITE logFile(IntTQa3Str,CR) WRITE logFile(IntTQa4Str,CR) WRITE logFile(IntTQa5Str,CR) WRITE logFile(IntTQa6Str,CR) WRITE logFile('ANG;') WRITE logFile(IntANGa1Str,CR) WRITE logFile(IntANGa2Str,CR) WRITE logFile(IntANGa3Str,CR) WRITE logFile(IntANGa4Str,CR) WRITE logFile(IntANGa5Str,CR) WRITE logFile(IntANGa6Str,CR) DELAY(period) UNTIL DOUT[1]=OFF -- stop recording, close log file CLOSE FILE logFile END dataextract
Keep in mind, as my previous reply states, these TORQUE values are not very useful unless scaled and I haven't found any forum threads detailing how this would be done.
-
When you run the program are you getting uninitialized data on line 125 of your karel program?
The Torque values stored in $MOR_GRP[1].$CUR_TORQUE[] are some cursed UINT Values as detailed by this thread: FANUC PROJECT: Data recording with background Karel program - Fanuc Robot Forum - Robotforum - Support and discussion community for industrial robots and cobots (robot-forum.com) I think trying to get/convert/write these UINT Values is causing your issue.
Judging by the variable names you used, you've already looked over part of this thread, however, I don't think the thread landed on a Karel happy solution. If you remove the torque logging from your program the rest works just fine.
-
I guess I'm confused as to why the allegedly taught frame has perfect WPR values? Even If the robot and table were leveled impeccable I would expect a hand taught frame to have some orientation values. If you are teaching the frame, and then changing your rotations that could absolutely cause the issue.
-
Can you explain what you mean by initialized?
I installed an old image in the r30iB late yesterday, and it's now acting like the r30iB for the most part.
In each case, the TP program is set up for both group 1 and group 2. (1,1,*******)
Thanks.
Set the robot group to 2, and look at the position data of your point positions. If the data is uninitialized the values should be asterisks ex (X: *.*******) but if the data is initialized but zeroed out it will look like this ex:( X: 0.000). If the data is uninitialized then I don't think the robot will care which frame is selected and won't try to move the extended/aux axis. I'm wondering if somebody touched up or entered values into the group 2 data in your program and if that's what caused the difference between the two robots.
-
You should be able to change an element's Opacity in HTML. It is a Style attribute like color.
-
Is the group 2 position data initialized on the r30iB robot and not initialized on the r30iA?
-
That is exactly what I am trying to do, "Run a program on the controller from an external HMI." The representative I have been in contact with stated it's a confusing process and you have to actually move a program from the TP to the HMI, and that they do not have the same memory to pull from. I assumed he meant via USB since there are USB ports on both the HMI and TP. However when I saved a test program on to a USB and tried to plug it in to the HMI i got no prompt or anything on the HMI to open said program or save it to the HMI inorder to run it.
I also assume you are already running other robot program(s) from the HMI and would just like to add a new one?
In some limited scenarios, I have seen systems set up with PCDK and a PC to push and pull programs on and off the robot controller. However, in 99% of the applications, I have seen the HMI/PLC is simply signaling the robot to start a program that lives on the controller.
Unfortunately for your problem, there are many ways this start "signal" or process can be set up and it may require PLC/HMI/Network/Electrical experience to understand what's going on. Here is a page detailing some of the various ways an external device can select and start a program on a fanuc controller: https://www.onerobotics.com/posts/2016/sta…robots-in-auto/
You will need to figure out what your system has for HMI/PLC and what the program select method is being used before even starting to add/run additional programs.