Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
How to log the TCP speed every 0.01sec without using Multitask ()?
Are there any way to do it smartly?
I've already found 2 ways to log the TCP speed.
1. Use [Signal Analyzer Online] of RobotStudio by monitoring the System AO called [TCP Speed].
2. Use [Multitask] option of IRC5 and create 2 tasks; one is the program of robot movements, and other is the logging program showing below.
--
I've already found 2 ways to log the TCP speed.
1. Use [Signal Analyzer Online] of RobotStudio by monitoring the System AO called [TCP Speed].
2. Use [Multitask] option of IRC5 and create 2 tasks; one is the program of robot movements, and other is the logging program showing below.
--
MODULE MAINMODULE
VAR iodev logfile;
VAR clock clkv;
! Logging TCP Speed from System Analog Output every 5 [ms] using multitasking
PROC main()
ClkReset clkv;
ClkStart clkv;
! Create log file named "TCPSPEEDLOG_[DATE][TIME].csv"
Open "HOME:" \File:="TCPSPEEDLOG_"+StrPart(CDate(),1,4)+StrPart(CDate(),6,2)+StrPart(CDate(),9,2)+StrPart(CTime(),1,2)+StrPart(CTime(),4,2)+StrPart(CTime(),7,2)+".csv", logfile \Write;
Write logfile, "TCP Speed Log";
Write logfile, CDate()+","+CTime();
Write logfile, "";
Write logfile, "Time [s],TCP Speed [mm/s],TCP Speed Reference [mm/s]";
! Stop iteration when TASK "T_ROB1" is terminated by checking with DO112.
WHILE DO112=0 DO
Write logfile, ValToStr(ClkRead(clkv\HighRes))+","+ValToStr(AOutput(TCP_Speed)*1000)+","+ValToStr(AOutput(TCP_Speed_Reference)*1000);
WaitTime 0.01;
ENDWHILE
Close logfile;
TPWrite "FINISHED!";
ClkStop clkv;
ClkReset clkv;
ENDPROC
ENDMODULE
--
--
Post edited by Hikaru_KIMURA on
0
Answers
-
Look up trap/interrupt procedures.
0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings