4.5. QNX Neutrino

4.5.1. Thread priority

QNX supports a total of 256 scheduling priority levels. A non-root thread can set its priority to a level from 1 to 63 (the highest priority).

Using priorities higher than 63 is only possible if the allowed priority range is changed for non-root processes:

procnto -P priority

For more information’s about changing the priority range refer to the QNX documentation.

Attention

Don’t changing the priority range leads to bad timing performance!

4.5.3. Setting up and running EcMasterDemo

  1. QNX Neutrino OS configuration

    In order to get real-time priority (e.g. 250), see Thread priority and also set JOBS_PRIORITY. The applications needs root privileges to increase the priority above 63.

  2. Unbind Link Layer instance, e.g.
    ifconfig en1 destroy
    
  3. Copy files from EC-Master package /bin and eni.xml to directory e.g. /tmp.

  4. Adjust LD_LIBRARY_PATH search locations for Optimized Link Layers if necessary, e.g.
    export LD_LIBRARY_PATH=/tmp:$LD_LIBRARY_PATH
    
  5. Run EcMasterDemo
    cd /tmp
    ./EcMasterDemo -f eni.xml -i8254x 1 1 -perf
    

4.5.4. OS Compiler settings

Besides the general settings from Compiling the EcMasterDemo the following settings are necessary to build the example application for QNX Neutrino.

Extra include paths
<InstallPath>/SDK/INC/QNX
<InstallPath>/Examples/Common/QNX
Extra source paths
<InstallPath>/Examples/Common/QNX
<InstallPath>/Sources/OsLayer/QNX
Extra library paths to the main EtherCAT components
<InstallPath>/SDK/LIB/QNX
Extra libraries (in this order)
AtemRasSrv EcMaster socket