SharedMemory with RT_PREEMPT - unexpected real tim

More
05 Oct 2012 06:11 #24966 by t1m0n
Hey, I'am using LinuxCNC with SharedMemory Patch from Michael Abel with RT_PREEMPT instead of RTAI for real time.
If I start linuxcnc I get the following warning: (see image).
I get in the following Warnings after while in terminal:
msruser103@MSRPC-103:~$ cd Downloads/linuxcnc
msruser103@MSRPC-103:~/Downloads/linuxcnc$ . scripts/rip-environment
msruser103@MSRPC-103:~/Downloads/linuxcnc$ linuxcnc
LINUXCNC - 2.6.0~pre
Machine configuration directory is '/home/msruser103/Downloads/linuxcnc/configs/SharedMemory'
Machine configuration file is 'axis_mm_SharedMemory.ini'
Starting LinuxCNC...
REALTIME SCRIPT CALLED AS USER :  msruser103
Realtime: loading
io started
halcmd loadusr io started
MOTION: init_module() starting...
MOTION: init_hal_io() starting...
MOTION: init_hal_io() complete, 3 axes.
MOTION: init_comm_buffers() starting...
MOTION: init_comm_buffers() complete
MOTION: init_threads() starting...
rtapi_clock_set_period (res=1) -> 5000000
Creating new task with requested priority 98 (highest=99 lowest=1)
About to pthread_create task 0
Created task 0
Hello world, I am task 0
rtapi task 0: Reset pagefault counter
task 0x8052390 period = 5000000 ratio=1
Setting affinity of 0
Using CPU 1
Calling pthread_setaffinity_np() for 0
pthread_setaffinity_np() for 0 done
Affinity set for 0
Task 0 finished its basic init
MOTION: setting Servo cycle time to 5000000 nsecs
MOTION: setting Traj cycle time to 5000000 nsecs
MOTION: init_threads() complete
MOTION: init_module() complete
New maximum latency of task 0 is 10 at period 5000 us
New maximum latency of task 0 is 12 at period 5000 us
New maximum latency of task 0 is 14 at period 5000 us
New maximum latency of task 0 is 27 at period 5000 us
creating new semaphore 2 emcsem1
SHM_INTERFACE: installed 1 counter counters
New maximum latency of task 0 is 28 at period 5000 us
New maximum latency of task 0 is 39 at period 5000 us
MOTION: setting Traj cycle time to 5000000 nsecs
MOTION: setting Servo cycle time to 5000000 nsecs
task pid=1657
New maximum latency of task 0 is 54 at period 5000 us

In recent history there were
5009010, 5017652, 5000970, 5012760, and 5007790
elapsed clocks between calls to the motion controller.
This time, there were 6744098 which is so anomalously
large that it probably signifies a problem with your
realtime configuration.  For the rest of this run of
EMC, this message will be suppressed.

Unexpected realtime delay: check dmesg for details.
emcTaskInit: using builtin interpreter
New maximum latency of task 0 is 395 at period 5000 us
ERROR: Missed scheduling deadline (50us) for task 0 [1 times]
	Now is 177.909258672, deadline was 177.913863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [1 times]
	Now is 177.909258672, deadline was 177.913863393
	Absolute number of pagefaults in realtime context: 33

New maximum latency of task 0 is 5050 at period 5000 us
ERROR: Missed scheduling deadline (50us) for task 0 [2 times]
	Now is 177.938913539, deadline was 177.938863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [3 times]
	Now is 177.939097369, deadline was 177.943863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [4 times]
	Now is 177.996203097, deadline was 177.998863393
	Absolute number of pagefaults in realtime context: 33
New maximum latency of task 0 is 124503 at period 5000 us
ERROR: Missed scheduling deadline (50us) for task 0 [5 times]
	Now is 178.738367328, deadline was 178.618863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [6 times]
	Now is 178.738517424, deadline was 178.623863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [7 times]
	Now is 178.738599561, deadline was 178.628863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [8 times]
	Now is 178.738720322, deadline was 178.633863393
	Absolute number of pagefaults in realtime context: 33
ERROR: Missed scheduling deadline (50us) for task 0 [9 times]
	Now is 178.738793169, deadline was 178.638863393
	Absolute number of pagefaults in realtime context: 33

This is my configuration file:
# EMC controller parameters for a simulated machine.

# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

# General section -------------------------------------------------------------
[EMC]

# Version of this INI file
VERSION =               $Revision$

# Name of machine, for use with display, etc.
MACHINE =               EMC-HAL-SIM-AXIS

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG =               0x7FFFFFFF
DEBUG = 0

# Sections for display options ------------------------------------------------
[DISPLAY]

# Name of display program, e.g., xemc
DISPLAY =             axis

# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME =            0.0100

PYVCP = shm_gui.xml

# Path to help file
HELP_FILE =             doc/help.txt

# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET =       RELATIVE

# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK =     ACTUAL

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE =     1.2
MAX_SPINDLE_OVERRIDE =  1.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/

# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5

EDITOR = gedit

INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script

png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

# Task controller section -----------------------------------------------------
[TASK]

# Name of task controller program, e.g., milltask
TASK =                  milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME =            0.001

# Part program interpreter section --------------------------------------------
[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE =        sim_mm.var

# Motion control section ------------------------------------------------------
[EMCMOT]

EMCMOT =              motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT =          1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT =             0.010

# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
BASE_PERIOD  =               0
# Servo task period, in nano-seconds
SERVO_PERIOD =               5000000

# Hardware Abstraction Layer section --------------------------------------------------
[HAL]

# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#

# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE =                    SharedMemory.hal
HALFILE =		     axis_manualtoolchange.hal
HALFILE = simulated_home.hal
#HALFILE = gamepad.hal

# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD =                    save neta

# Single file that is executed after the GUI has started.  Only supported by
# AXIS at this time (only AXIS creates a HAL component of its own)
#POSTGUI_HALFILE = test_postgui.hal

POSTGUI_HALFILE = shm_gui.hal

HALUI = halui

# Trajectory planner section --------------------------------------------------
[TRAJ]

AXES =                  3
COORDINATES =           X Y Z
HOME =                  0 0 0
LINEAR_UNITS =          mm
ANGULAR_UNITS =         degree
CYCLE_TIME =            0.010
DEFAULT_VELOCITY =      30.48
MAX_VELOCITY =          53.34
DEFAULT_ACCELERATION =  508
MAX_ACCELERATION =      508
POSITION_FILE = position_mm.txt

# Axes sections ---------------------------------------------------------------

# First axis
[AXIS_0]

TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  30.48
MAX_ACCELERATION =              508
BACKLASH = 0.000
INPUT_SCALE =                   157.48
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -254
MAX_LIMIT =                     254
FERROR = 1.27
MIN_FERROR = .254
HOME_OFFSET =                    0.0
HOME_SEARCH_VEL =                127
HOME_LATCH_VEL =                 25.4
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1
HOME_IS_SHARED = 1

# Second axis
[AXIS_1]

TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  30.48
MAX_ACCELERATION =              508
BACKLASH = 0.000
INPUT_SCALE =                   157.48
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -254
MAX_LIMIT =                     254
FERROR = 1.27
MIN_FERROR = .254
HOME_OFFSET =                    0.0
HOME_SEARCH_VEL =                127
HOME_LATCH_VEL =                 25.4
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1

# Third axis
[AXIS_2]

TYPE =                          LINEAR
HOME =                          0.0
MAX_VELOCITY =                  30.48
MAX_ACCELERATION =              508
BACKLASH = 0.000
INPUT_SCALE =                   157.48
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -50.8
MAX_LIMIT =                     101.6
FERROR = 1.27
MIN_FERROR = .254
HOME_OFFSET =                    25.4
HOME_SEARCH_VEL =                127
HOME_LATCH_VEL =                 25.4
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 0
HOME_IS_SHARED = 1

# section for main IO controller parameters -----------------------------------
[EMCIO]

# Name of IO controller program, e.g., io
EMCIO = 		io

# cycle time, in seconds
CYCLE_TIME =    1

# tool table file
TOOL_TABLE =    sim_mm.tbl
TOOL_CHANGE_POSITION = 0 0 50.8
I set the time from 50us to 50000us but it doesn't work too.
What is my problem?
I checked real time with cyclictest- the system supports real time.
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Oct 2012 09:38 #24968 by andypugh
t1m0n wrote:

Hey, I'am using LinuxCNC with SharedMemory Patch from Michael Abel with RT_PREEMPT instead of RTAI for real time.


Don't be surprised if you don't get any answers to this. I don't know how many people are trying to use RT-PREEMPT and it is very experimental.

If you actually want to make parts rather than be part of the task to develop RT-PREEMPT then the normal (RTAI) installation is definitely the way to go.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum