Real-time Linux / Windows Simulator

The threads are assigned to the CPU cores in the realtime configuration of the CNC. Parameterisation takes place in rt_conf.lis.

A CPU core can be assigned to the thread by P-RTCF-00015. If this value is invalid, the warning ID 1000181 is output and the operating system assumes the assignment.

The individual threads are assigned to CNC tasks by means of context entries. The value of the context entry (P-RTCF-00017) of the thread and the value of the context entry in the channel list must match the particular task.

Example

example

Parameterisation example: rt_conf.lis

# ****************************************

#

#  RT configuration

#

# ****************************************

#  LINUX      [1; 99]   1   highest

#  RTX        [0; 127]  127 highest

#  VXWORKS    [0; 255]  0   highest

#  WindowsCE  [0; 255]  0   highest, 9 CANopen, 10-15 CNC, 16-64 PLC

#

# trace bit : 0 - off, 1 - DTR on COM1, 2 - RTS on COM1, 3 - DTR on COM2, 4 - RTS on COM2

#

#

interrupt_source                        1    # 1 == internal timer, 2 == external IRQ, 3 == external semaphore

cycle_time                           2000    # cycle time in micro s

time_slice                           1000

windows_time                            0    # 0 turned off

schedule                                1    # Standard

#

thread[0].name                             GEO1

thread[0].cpu                              1   # CPU core 1

thread[0].context_info                     0

thread[0].cycle                            2000

thread[0].priority                         31 # HIGHEST

thread[0].error_on_overflow                1

thread[0].function[0].name                 task_int

thread[0].function[0].calls_per_cycle      1

thread[0].function[0].trace_bit            1

#

thread[1].name                             BACKGROUND

thread[1].cpu                              2   # CPU core 2

thread[1].context_info                     4

thread[1].cycle                            1000

thread[1].priority                         34 # NORMAL

thread[1].error_on_overflow                0

thread[1].function[0].name                 task_rnd

thread[1].function[0].calls_per_cycle      1

thread[1].function[0].trace_bit            3

#

thread[2].name                             MMI_DRIVER

thread[2].cpu                              2   # CPU core 2

thread[2].context_info                     6

thread[2].cycle                            12000

thread[2].priority                         35

thread[2].error_on_overflow                0

thread[2].function[0].name                 task_mmi_driver

thread[2].function[0].calls_per_cycle      1

thread[2].function[0].trace_bit            0

#

thread[3].name                             COM

thread[3].cpu                              2   # CPU core 2

thread[3].context_info                     5

thread[3].cycle                            4000

thread[3].priority                         35

thread[3].error_on_overflow                0

thread[3].function[0].name                 task_com

thread[3].function[0].calls_per_cycle      1

thread[3].function[0].trace_bit            4

#

thread[4].name                             GEO2

thread[4].cpu                              3   # CPU core 3

thread[4].context_info                     1

thread[4].cycle                            2000

thread[4].priority                         31 # HIGHEST

thread[4].error_on_overflow                1

thread[4].function[0].name                 task_int

thread[4].function[0].calls_per_cycle      1

thread[4].function[0].trace_bit            1

#

# external_thread[0].semaphore_name     external_sps

# external_thread[0].cycle              10000

#

End

The related parameters for the particular assignments in the channels are as follows:

Channel parameter list 1 - GEO1, SDA and the COM

schedulde.context.geo                0

schedulde.context.com                5

schedulde.context.sda                4

Channel parameter list 2 – GEO2

schedulde.context.geo                1