1 / 10

Power PMAC as a Linux Computer January 2012

Power PMAC as a Linux Computer January 2012. Power PMAC Linux OS. Linux is an open-source, public-domain operating system Standard Linux has a non-preemptive multi-tasking kernel The kernel provides an execution environment for different applications

brody
Télécharger la présentation

Power PMAC as a Linux Computer January 2012

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Power PMAC as a Linux ComputerJanuary 2012

  2. Power PMAC Linux OS • Linux is an open-source, public-domain operating system • Standard Linux has a non-preemptive multi-tasking kernel • The kernel provides an execution environment for different applications • The kernel implements services and interfaces for the applications • Without pre-emption, cannot do hard real-time control tasks (e.g. servos) • Power PMAC uses pre-emptive real-time kernel replacement • Xenomai open-source real-time kernel • Handles all hardware interrupts itself, blocks them from regular Linux • Runs single real-time application to handle Power PMAC “foreground” tasks (phase, servo, real-time interrupt – built-in and user-written) • Releases to regular Linux as “general-purpose OS” (GPOS) when interrupt tasks are done • Linux GPOS can run multiple applications • Dedicated Power PMAC “background tasks” • User C subroutines and application programs

  3. Basic Linux Commands • ls List directory • cd Change directory • mkdir Make directory • rmdir Remove directory • rm Delete file • mv Move or rename file • more List contents of text file • ps -e List active process • pkill Kill process • whereis Show full path to file • top –d 1 Display task manager window

  4. Power PMAC Linux File System Types • ext2 (standard Linux file system) • Write-protected with hardware jumper • Protects against flash wear, user corruption of OS files • tmpfs (temporary file system) • Used for active memory of files in RAM, lost on power cycle • vfat (Microsoft fat32 file system) • For generic USB stick access • smbfs (Samba file system) • So can access Microsoft-type network directly • nfs (Linux network file system) • So can access Linux-type network directly

  5. Key Power PMAC Linux File Folders • /opt – for Power PMAC software package, add-on packages • /var – for variable data stored by utilities and servers • /media – mount point for externally attached storage media • /media/usbdisk – mount point for USB memory stick • /media/sdcard – mount point for Secure Digital memory card • /media/shared – mount point for PC’s shared file folder • /root – administrator home folder • /bin – for essential Linux user commands • /dev – for device drivers • /lib – for essential libraries

  6. The opt/ppmac File Folder • /opt/ppmac is folder for Power PMAC software package • Power PMAC Linux applications in this folder include: • gpascii – Basic ASCII communications terminal to controller • gather_csv – Data gathering reporting program • projpp – Application and project loader program • gppmac – Background Power PMAC task execution program • stepmove, parabolicmove – Tuning-move programs • getsends – Handles sent strings from Power PMAC script programs • geterrors – Monitors for alerts of specified error conditions • Power PMAC real-time drivers also in this folder • /opt/ppmac/usrflash has saved (non-volatile) storage of user’s application – write-protected except during save operation

  7. The var/ftp/usrflash File Folder • /var/ftp/usrflash is top-level folder for active user configuration • Volatile folder in RAM (not in flash – despite folder name) • IDE loads project files into this directory on build/download • Copied from opt/ppmac/usrflash on power-on/reset • Commands in files then executed – including loading of programs into controller buffer • Copied to opt/ppmac/usrflash on save command • Sub-directory /Project contains user programs and project files • Sub-directory /PMAC Script Language contains Script motion and PLC programs • Sub-directory /C Language contains C routines and application programs • Sub-directory /Configuration contains project-management files • Sub-directory /Database contains system data for project • Note that programs can be loaded directly into controller program buffer, bypassing file system (but these cannot be saved)

  8. Files and Folders for Power PMAC Projects • Project downloading copies files from PC into /var/ftp/usrflash/ folders in RAM • Script commands are then executed from these files, loading program commands into active buffers • save command copies files into /opt/ppmac/usrflash/ folders in flash memory (previous versions retained) • Power-up/reset copies files from flash into RAM, then executes Script commands from these files • Direct loading of program commands permitted, but no save possible

  9. Power PMAC Modules gppmac C Application libplcc.so CPLC thread libppmac.so librti.so RTI thread Bkg thread High Latency User Space (100us max)‏ RTI semaphore Shared Memory pshm Low Latency Kernel Space (20us max)‏ rtpmac.ko usralgo.ko usralgo.ko libppmac.ko libppmac.ko .ko files are kernel objects (device drivers)‏ .so files are shared libraries (dll)‏

  10. Power PMAC Modules • rtpmac.ko – Interrupt handler, a few driver calls – PMAC phase, servo, RTI • libppmac.ko • Useful kernel driver function library (i.e. Custom Math Library)‏ • Functions in libppmac.ko can be called from user custom algorithms • usralgo.ko • Custom servo and phase routines written by customer in C • gppmac – executes functions in library to create PMAC background • libppmac.so • RTI thread - librti.so – custom routine created by IDE loaded by libppmac.so if UserAlgo.RtiCplc = 1 • Custom routine triggered by semaphore (special OS flag posted every RTI)‏ • Cplc thread - libplcc.so – custom routine created by IDE loaded by libppmac.so if UserAlgo.BgCplc = 1 • Custom routine triggered between each background Script PLC scan • Background Thread • Executes background Script PLC programs • Triggers CPLC thread

More Related