DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control...

10
DELTA TAU Data Systems, Inc. 1 UMAC Turbo Turbo PMAC PCI Geo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January 2012

Transcript of DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control...

Page 1: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

1

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

Power PMAC as a Linux ComputerJanuary 2012

Page 2: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

2

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

Page 3: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

3

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

Page 4: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

4

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

Page 5: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

5

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

Page 6: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

6

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

Page 7: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

7

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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)

Page 8: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

8

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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

ActiveProjectFiles

/var/ftp/usrflash/

Program &Table

Buffers

SavedSetup

Elements

ActiveSetup

Elements

)1(Re set

)1(save

)2(save

)2(Re set

PowerPMAC

erHostComput

)2(Download

)3(Re set

)1(

Pr

Download

ojectCommands

Commands

Memory

Flash

volatileNon

RAM

Active

Volatile

SavedProject Files

/opt/ppmac/usrflash/

Page 9: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

9

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

Power PMAC Modules

.ko files are kernel objects (device drivers).so files are shared libraries (dll)

Low LatencyKernel Space (20us max)

High LatencyUser Space (100us max)

rtpmac.kousralgo.ko

libppmac.ko

Shared Memory pshm

libppmac.ko

gppmac

libppmac.so

RTI semaphore

CPLC thread

RTI thread

C Application

librti.so

usralgo.ko

libplcc.so

Bkg thread

Page 10: DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.

DELTA TAUData Systems, Inc.

10

UMAC Turbo Turbo PMAC PCI Geo Drive

Single Source Machine Controlmotionlogicdata

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