hoitzing you've saved me i am grateful. thank you for your time
Posts by clark99
-
-
Nation thank you in advance
-
hoitzing thank you very much
will a karel code like this work for my application
(read on the forum)_______________________________________________
PROGRAM UD1_WRITE
%NOLOCKGROUPVAR
FTP_FILE :FILE
--------------------------------------
ROUTINE init_cond
BEGIN
IF OPOUT[1] = ON
THEN
ENDIF
END init_cond
--------------------------------------
ROUTINE write_file
BEGIN
WRITE FTP_FILE ($SCR_GRP[1].$MCH_POS_X,',')
WRITE FTP_FILE ($SCR_GRP[1].$MCH_POS_Y,',')
WRITE FTP_FILE ($SCR_GRP[1].$MCH_POS_Z,',')
WRITE FTP_FILE ($TIMER[1].$TIMER_VAL,CR)
DELAY 100
END write_file
--------------------------------------
BEGIN
OPEN FILE FTP_FILE ('AP', 'UD1:\TEST13.CSV')
WRITE FTP_FILE('X-POS, Y-POS, Z-POS, TIME',CR)
WHILE TRUE DO
init_cond
write_file
ENDWHILE
WRITE FTP_FILE ('test complete',CR)
CLOSE FILE FTP_FILE
END UD1_WRITE -
thank you for your answers.
i am ready to dive in Karel if it is the only way.
i will need a sample time of 3s. the final application of those data is to run a mesgrid on matlab
i have been reading some post on the forum about running a karel program on the background of the tp program.
this code for example (read on the forum)
________________________________________________________________
!Start recording data each 100 ms, during 20000 ms in a usb file
CALL DATARECORDER(100, 20000, 'UD1:logfile.dt')
J P[1] 100% FINE
J P[1] 100% FINE_________________________________________
PROGRAM datarecorder
%COMMENT = 'LOG DATA RECORD'
%SYSTEM
%NOLOCKGROUP
%NOABORT=ERROR+COMMAND+TPENABLE
%NOPAUSE=ERROR+COMMAND+TPENABLE %NOPAUSESHFTi found a way to write karel code on roboguide using the file in the cell tree
i am wondering if it is the right way to write a karel program to run in the background of my tp program -
Hi experts
Here is my situation and i need your guidance,
i have been able to enable real time position monitor ( SCR_GRP[1].$M_POS_ENB to true), monitoring XYZ coordinates of the TCP
and i have sent those values to 3 registers.
While the simulation is running i can see those values changing in my registers.
Now i would like to record those values in a file using a time sample.
any help is welcome
thank you in advance -
Thank you. Have a excellent day
-
okay i will try to be as clear as i can.
here is my project, i am using a robot to go through half of cylinder using 3 taught point that i have recorded has PR, and i am using an offset on the Z coordinate of each of the 3 points to move from the top to the bottom of the cylinder.
have the simulation running perfectly, i now have to do a matlab 3d plot or mesh from my different coordinates (XYZ).
at first i thought that i could export my PRs as csv and run it on matlab, and now i am realising that the approach was not good, that's why i am asking if there is a better way.
i hope i have been clearer than the first time.
By the way i really appreciate your help sir -
As far as I know, there's no option to export the position register as a csv file.
One option would be to use the POSREG.VA file (available on the robot's memory device, MD:\). This file contains all position registers values in ASCII format, so you'd have to convert it to a file with comma-separated XYZ coordinates yourself (using python or whatever suits you).
Another option, if you have access to KAREL, would be to create a program for exporting the XYZ coordinates. Create an ASCII data file (FANUC typically uses *.DT for this I believe?), loop over all position registers, and write the XYZ coordinates to the file. You might be able to write to a *.csv file instead of *.DT, but I'm not sure if KAREL WRITE commands care about filetype suffix.
Something to keep in mind is that position registers can express a position in joint representation as well. You'd have to convert or skip these entries. Using the KAREL approach would be preferred if you cared about the joint positions as well, as it has a built-in conversion routine.
my end goal is to used my roboguide program position to run a matlab meshing.
According to your knowlegde and experience, can you think of better way to achieve it? -
thanks a million
As far as I know, there's no option to export the position register as a csv file.
One option would be to use the POSREG.VA file (available on the robot's memory device, MD:\). This file contains all position registers values in ASCII format, so you'd have to convert it to a file with comma-separated XYZ coordinates yourself (using python or whatever suits you).
Another option, if you have access to KAREL, would be to create a program for exporting the XYZ coordinates. Create an ASCII data file (FANUC typically uses *.DT for this I believe?), loop over all position registers, and write the XYZ coordinates to the file. You might be able to write to a *.csv file instead of *.DT, but I'm not sure if KAREL WRITE commands care about filetype suffix.
Something to keep in mind is that position registers can express a position in joint representation as well. You'd have to convert or skip these entries. Using the KAREL approach would be preferred if you cared about the joint positions as well, as it has a built-in conversion routine.
-
Hello,
i have recently started to use roboguide and i was wondering if it is possible to export position register as a csv file with X, Y, Z data only.
if it is not possible, what is the best way to accomplish somethink similar.
i have been able to export target from robodk as csv but i want to have a similar result on roboguide as i am achieving the same result with less points using position offset.any information on this topic would help.
thank you in advance.