Home

b166 - E4Coder

image

Contents

1. 24 AMA EVIDENCE XN ScicosLab File Control Demos Help Editor Toolboxes Graphic Window 1000 totypes pipe DMODEL SuperBlock DMODELN SuperBlock c c o common o common c gcc 0 DNDEBUG Dlinux DNARROWPROTO D GNU SOURCE 02 I usr lib scicoslab gtk 4 4 1 routines I usr lib scicoslab gtk 4 4 1 routines scicos I I usr realti me include 02 I usr src linux headers 2 6 38 8 rtai include Wall Wstrict pro totypes pipe DMODEL SuperBlock DMODELN SuperBlock c c o SuperBlock o Supe rBlock c gcc 0 DNDEBUG Dlinux DNARROWPROTO D GNU SOURCE 02 I usr lib scicoslab gtk 4 4 1 routines I usr lib scicoslab gtk 4 4 1 routines scicos I I usr realti me include 02 I usr src linux headers 2 6 38 8 rtai include Wall Wstrict pro totypes pipe DMODEL SuperBlock DMODELN SuperBlock c c o SuperBlock Cblock s o SuperBlock Cblocks c gcc static o SuperBlock rtmain44 0 common o SuperBlock o SuperBlock Cblock s o usr lib scicoslab gtk 4 4 1 libs scicos a usr lib scicoslab gtk 4 4 1 libs poly a usr lib scicoslab gtk 4 4 1 libs calelm a usr lib scicoslab gtk 4 4 1 libs blas a usr lib scicoslab gtk 4 4 1 libs lapack a usr lib scicoslab gtk 4 4 1 libs blas a usr lib scicoslab gtk 4 4 1 libs os specific a usr realtime li b libsciblk a usr realtime lib liblxrt a lpthread lcomedi lgfortran lm Created executable SuperBlock gt Target generation terminated Chapter 3 E4Box Startup A
2. Semaphore name This parameter gives the name of the semaphore IP Addr Semaphore name This parameter gives the name of the semaphore IP Addr This parameter gives the semaphore IP address 127 0 0 1 localhost semaphore IP address 127 0 0 1 localhost 4 1 6 File system input output 4 1 6 1 EXTDATA block Y extdata test dat Figure 4 23 The EXTDATA block The EXTDATA block see Figure 4 23 models a loading data action The file have to be composed by a single column containing the ASCII representation of a value at each sampling time The parameters of the block are File Name This parameter gives the name of the file containg the data max 29 chars Nr of Points This parameter gives the number of data points contained by the file AQ AMA EVIDENCE Chapter 4 ScicosLab Blocks Lo 10 Figure 4 24 The LOG block 4 1 6 2 LOG block The LOG block see Figure 4 24 models an RTAI log block The parameters of the block are LOG Name This parameter gives the name of the log file 4 1 7 Miscellaneous 4 1 7 1 EXTCLOCK block EAT CLOCK Y Figure 4 25 The EXTCLOCK block The EXTCLOCK block see Figure 4 25 models an external clock source The parameters of the block are Expected Sample Time s This parameter gives the expected sample time from the external clock source 4 1 7 2 C RTAI block The C RTAI block see Figure 4 26 models external C code to be compiled and linked w
3. Figure 3 16 Output generated on the ScicosLab console by a successful code generation The application can be executed by opening a shell and typing the following commands the destination directory is the one specified in the code generation dialog box in Figure CAE cd home e4box Desktop Examples SuperBlock v The commandline option v is used to make the application verbose Figure 3 17 illustrates the output on the shell generated by the running application 2090 e4box e4box desktop Desktop Examples File Edit View Terminal Help e4box e4box desktop Desktop Examples SuperBlock v Target settings Real time HARD Timing internal periodic Priority 0 Finaltime RUN FOREVER CPU map TARGET STARTS internal timer SuperBlock Executes on CPU map f Sampling time 1 000000e 01 s Target is running Figure 3 17 Output on the shell console generated by executing the real time application 3 8 Running QRTAILab QRTAILab http qrtailab sourceforge net a QT based port of XRTAILab is a user interface for RTAI that can be used as monitoring application and virtual 29 AAA EVIDENCE Chapter 3 E4Box Startup oscilloscope for interacting with real time application generated by ScicosLab With QRTAILab you can e inspect the data exchanged by the various blocks in a graphical form a scope a led e change the parameters of the various blocks useful for calibrating t
4. Al 14 Al GND ne Al 7 Al 15 TERMINAL 68 pr TERMINAL 34 Al GND AOO AO GND AO 1 AO GND NC D GND P0 4 P0 0 D GND P0 5 P0 1 D GND PO 6 P0 2 D GND P0 7 45V P0 3 D GND PEI 11 P2 3 D GND TERMINAL 35 d TERMINAL 1 PFI 10 P2 2 PFI O P1 0 D GND PFI 1 P1 1 O PFI 2 P1 2 D GND PFI 3 P1 3 45V PFI 4 P1 4 D GND PFI 13 P2 5 PFI 5 P1 5 PFI 15 P2 7 PFI 6 P1 6 PFI 7 P1 7 D GND PFI 8 P2 0 PFI 9 P2 1 D GND PFI 12 P2 4 D GND PFI 14 P2 6 Bt um NC No Connect Figure 2 1 National Intruments PCI 6221 pinout DAQ M Series M Series user Manual from National Instruments Figure 2 1 shows the pinout of the NI PCI 6221 For electrical details please refer to DAQ M Series M Series User Manual http www ni com pdf manuals 371022k pdf 2 2 Other Data Acquisition boards Integrating E4Box with other Comedi supported data acquisition boards or commu nication board such as CAN peripherals is possible If interested please contact info evidence eu com 15 3 E4Box Startup This chapter contains a step by step guide which describes a first startup procedure from scratch In particular we will discuss e How to power on E4Box and start ScicosLab e How to create and simulate a simple design e How to generate code for the design and compile a simple target application e How to start QRTAILab to analyze the data taken from the target code running on E4Box 3 1 Unpacking E4Box 1 0 The E4Box pac
5. MEX Figure 4 19 T he MBX SEND IF block IP Addr This parameter gives the message box IP address 127 0 0 1 localhost 4 1 5 6 MBX SEND OVW block Y Mbs Send Dew me BHI Figure 4 20 The MBX SEND OVW block The MBX SEND OVW block see Figure 4 20 models a sending message box The mes sage will be sent possibly overwriting old messages already presents The parameters of the block are Input Ports This parameter gives the number of message output ports MBX Name This parameter gives the message box name IP Addr This parameter gives the message box IP address 127 0 0 1 localhost 4 1 5 7 SEM WAIT block SEM wait SEMI F Figure 4 21 The SEM WAIT block The SEM WAIT block see Figure 4 21 models a semaphore wait action The block decrement a semaphore value and wait for a signal event the calling task will wait until the semaphore value is negative The parameters of the block are 39 AU EVIDENCE Chapter 4 ScicosLab Blocks Semaphore name This parameter gives the name of the semaphore IP Addr This parameter gives the semaphore IP address 127 0 0 1 localhost 4 1 5 8 SEM SIGNAL block Y SEM signal Be SEM i Figure 4 22 The SEM SIGNAL block The SEM SIGNAL block see Figure 4 22 models a semaphore signal event The block increments a semaphore value if the resulting value is not positive the first task on the semaphore queue is allowed to run The parameters of the block are
6. Please note that the RTAI libraries are loaded by default Please type scicos to start Scicos l An error will be returned if you try to load the modules twice 19 AAA EVIDENCE sails Chapter 8 E4Box Startup Once started you can type scicos to start Scicos The Scicos window will appear as in Figure 3 7 gt OQ Untitled File Diagram Palette Edit View Simulate Format Tools RTAI Figure 3 7 The Scicos window 3 5 Creating your first design After loading all the necessary modules on the kernel see Section A 2 and opening ScicosLab and Scicos see Section 3 4 an empty Scicos windows as in Figure 3 7 is displayed To be able selecting the block consituting the application the palette tree have to be opend by selecting Palette Pal Tree on the Scicos window See Figure 3 8 After that please perform the following steps 1 Open the Sources Palette then select the Clock block Drag and drop it on the diagram You can specify the clock frequency by double clicking on the block In this example we suppose to use the default frequency of 0 1 seconds 2 Open the RTAI Lab Palette then insert in the diagram a Sine block see Section 4 1 1 1 and a Scope block see Section 4 1 3 2 3 After placing the three blocks you need to connect them as shown in in Figure 3 9 Please notice that two blocks could be easly connected by simply pressing L on the keyboard when the pointer is over an output port or
7. documentation and videos e For the documentation of ScicosLab please refer to http www scicos org documentations html and in particular to the ScicosLab book e For the documentation of the code generator for ScicosLab please refer to http www dti supsi ch bucher then choose the menu option Scicoslab Comedi and realtime control e For the documentation of Comedi please refer to http www comedi org doc index html e For the documentation of RTAI please refer to http www rtai org e For the documentation of NI PCI 6221 http sine ni com nips cds view p lang en nid 202004 12 AU EVIDENCE Chapter 1 Introduction 1 5 Licensing EABox Open Edition integrates free and open source software from various sources Full source code is available from the web sites of the various projects or is available on request from Evidence Deatails on the Open Source projects used in E4Box is available in Appendix C 1 6 Technical support Up to date information on E4Coder is available at the following website http www e4coder com For sales pricing technical support and general information please contact Evidence Srl directly at the address and phone numbers available at the following web page http www evidence eu com en contact us html 1 7 Acknowlegments We would like to acknowledge the work of Roberto Bucker SUPSI Lugano and Simone Mannori ENEA Research Center Brasimone branch f
8. gathering its IP address If you need to change that settings for example because you need to provide a static IP number you can use the menu option System Preferences Keyboard as shown in Figure A 7 As a result the Dialog box in Figure A 8 is displayed giving the possibility to change the Network configurations Figure A 7 Menu option to change the Network settings 46 AA EVIDENCE BED DIN Appendix A E4Box configuration 43 Applications Places System gt _ AG Network Connections Wired wireless ij Mobile Broadband VPN amp DSL Name Last Used Add Auto eth2 never 4 Edit Figure A 8 This Dialog Box can be used to change the Network Settings A 5 Configuring E4Box for remote access The default installation of E4Box included the necessary software to enable remote access If you need to enable remote desktop connection for instance to enable desktop sharing or to remote control E4Box you can use the menu option System Preferences Remote Desktop as shown in Figure A 9 As a result the Dialog box in Figure A 10 is displayed giving the possibility to change the remote desktop configurations 45 Applications Places System Lr 4 Wed May 15 5 08 PM Ei e4box 5 Preferences T d About Me Administration gt il Appearance Help and Support Assistive Technologies About GNOME Bluetooth E4Box Manual pdf About Ubuntu Broadcast Preferences 4 E IBus Preferences EH Key
9. 1 6 Technical support 6 6 6 eS e a 13 1 7 Acknowlegments 2 aa a a a a 13 Hardware Software Description 14 Zl VEMOS cocotero asar As As AA 14 date MOR lt lt ex ox ovo boo xo ox 8 4o ow 39 C90 RH ES 14 Z3 SOUNDS e bP OR eke ERR OEE ERS eS EEGs 14 2 1 8 Data Acquisition card NI PCI 6221 15 2 2 Other Data Acquisition boards lr 15 E4Box Startup 16 5l Unpacking eis camara AE eee eee S XX 16 pd eenen ee ee 16 3 9 Loading the Kernel modules 0 0 00000008 18 0 0 MATAS ScicosLaD sun se wk RO oe Sos ck ox oR eh ee Se HS 19 3 5 Creating your first design a a a a a 20 3 6 Generating Code a a e a a 22 3 7 Running the generated code ee 24 3 8 Running QRTAILab ss enn eat a 25 3 8 1 Data visualization with QRTAILab 27 3 8 2 Data Calibration with QRTAILab 28 ScicosLab Blocks 30 4 1 RTAI Lib Palette lle 30 4 1 1 Mathematical functions 30 Sd SIUE UE vano 30 AAA EVIDENCE Contents 4 1 1 2 SQUARE block ae 31 delen BIBP DOOR 423 9k dird Xo E ids d 31 4 1 2 Interaction with the Comedi Libraries 2 92 Alte COMEDIT A D block ooo x93 mood T R33 32 Blige COMEDI D A block 4o oix ee ede eee eb G3 3 32 1122 CONEDI DI DloCk ate ee x wow wow tenu dari 33 124 COMEDI DO block sa eae deeded ee wo ww we d 33 4 1 2 5 COMEDI Encoder block 34 4 1 3 RIAL Lab bloc
10. 16 Output generated on the ScicosLab console by a successful code genera EHE o x 9 9 4 x WIE WX S XORE m v 4 9 4o NONO WR UR EUR A 3 17 Output on the shell console generated by executing the real time application 3 18 QRTAILab main window ner X90 vox 4 3 19 QRTAILab Connected to Target mU Ope Manar suu xd ow FER 4 ERE x 39 S9 oes eee eR aa 3 21 QRTAILab main window displaying data generated by the real time ap DEBE as 9 9 44 43999 34559 X 42 9 R4 5 9 3 3 22 Setting block parameters on QRTAILab 4 1 The RTAI Lib Palette 2222222 xcow amp koxrEokoRORROREOROS X ox GG 4 2 The SINE block a uoo oo boo Ox E Xo Y ROS OXo X ROG Ox ORoxch ox ooo 43 The SQUARE block 2 2 2 5 665 o ow eee voy odo 15 17 17 18 18 19 19 20 21 21 22 22 23 23 24 24 29 29 26 2 24 AAA EVIDENCE List of Figures 148 The STEF BIDEN 0o s e dip Rm ce wo we ee a A 32 4 5 The COMEDI A D DION 0 x 9 9 Ro HERE SEH 9 x RP X ee Rs 32 40 Tbe COMEDI D A block e 9 945 RE wwe ee wee eR 32 A Tbe COMEDI DI block Geo e bee we SRR GERBER BRE 4 o9 BES 33 4 8 The COMEDI DO blocek 4 2x9 9 eed X 3 Xe EEE ERR ROE DOOD 33 4 9 The COMEDI ENCODER block cc crm 34 4 10 The LED block cs Pe ROPE EE ROKER 4 4X 9 43 3 X08 4 34 4 11 The SCOPE block se a ss bee oP OO rana e xor OX amp o amp o ko os 35 4 12 The METER
11. E4Box Open Edition Reference Manual Linux RTAI Code generation in minutes Version 1 0 May 20 2013 NEM AMA EVIDENCE About Evidence S r l Evidence is a company operating in the field of software for embedded real time systems It started in 2002 as a spin off company of the Real Time Systems ReTiS Lab of the Scuola Superiore Sant Anna Pisa Italy Today Evidence is a dynamic company having collaborations in the field of electronics telecommunications automotives and industrial automation People at Evidence are experts in the domain of embedded and real time systems with a deep knowledge on the design and specification flow of embedded software especially for the embedded market Besides providing consultancy services Evidence also provides BSPs based on Linux for embedded devices evaluation boards featuring most innovative 8 16 and 32 bit microcontrollers for the embedded market development tools for making embedded software development easier and tools for the schedulability analysis of real time tasks running on your final product For more information see http www evidence eu com Contact Info Evidence Srl Via Carducci 56 Localit Ghezzano 56010 S Giuliano Terme PISA Italy lel 39 050 99 11 224 Fax 39 050 99 10 812 For more information about Evidence products please send an e mail to the follow ing address infolevidence eu com Other information about the Evidence prod
12. RTM Meter Identifier ss RTY Synch Identifier Figure 3 19 QRTAILab Connected to Target 3 8 1 Data visualization with QRTAILab We can now proceed in graphically showing the data coming from the target application To do that please select View Scopes A dialog box will appear containing the blocks which are present in the ScicosLab diagram that generated the target application In our example we have a single Scope block You can then use the option Show Hide on the Scope tab see Figure 3 20 to show the Scope widget in the main QRTAILab window see Figure 3 21 Scopes Manager SCOPE i hold Plot Display Divider E 1 g Data points 10 Frames m sec div 0 1 mi Trigger Saving Figure 3 20 Scope Manager 27 AA EVIDENCE DORT Chapter 3 E4Box Startup gt QRtaiLab Graphical User Interface Project Target View Help OO 38 014 x gt 0 A Target SuperBlock Figure 3 21 QRTAILab main window displaying data generated by the real time application 3 8 2 Data Calibration with QRTAILab Please note that QRTAILab can be used not only to display the data coming from the target but also to modify calibrate the control parameters To open the Parameters Manager window please select View Parameter The Parameter Manager allows to modify store and load all the parameters defined by the blocks included in the original ocicos diagram Figure 3 22 ill
13. ScicosLab Blocks The LED block see Figure 4 10 models a real time LED The parameters of the block are Input Ports This parameter gives the number of LEDs Led Name This parameter gives the name of the LED 4 1 3 2 SCOPE block Y 1 SCOPE Figure 4 11 The SCOPE block The SCOPE block see Figure 4 11 models an XRTAllab QRTAllab scope The pa rameters of the block are Scope name This parameter gives the name of the scope Name of traces This parameter gives the number of inputs 4 1 3 3 METER block Y Meter METER Figure 4 12 The METER block The METER block see Figure 4 12 models an XRTAllab QRTAllab meter The pa rameters of the block are Meter Name This parameter gives the name of the meter 39 AU EVIDENCE Chapter 4 ScicosLab Blocks Y SENSOR SENS j Figure 4 13 The SENSOR block 4 1 4 Generic Sensors 4 1 4 1 SENSOR block The SENSOR block see Figure 4 13 models a generic RTAI input block parameter The parameters of the block are Output port This parameter gives the number of outputs Identifier This parameter gives the identifier of the sensor To enter the C code to be compiled and linked the Block Option dialog block have to be opened e g by double clicking than selecting ok a dialog presenting a skeleton fo the C function will be opened 4 1 4 2 ACTUATOR block Y ACTUATOR ACT Figure 4 14 The ACTUATOR block The ACTUATOR block
14. a wire and the right clicking on the destination input port 20 AA EVIDENCE MOEDDIN Chapter 3 E4Bozx Startup 00 Untitled File Diagram MN Edit View Region to Palette Load as Palette Save as Palette Figure 3 8 How to show the Scicos Palette Tree 4 To enable the visualization of the blocks name on QRTAllab XRTAllab see Sec tion 3 8 the Set Identification property have to be enabled on each block To perform this operation in this example please left click on the sine block and se lect on the contextual menu Block Properties Identification then on the resulting window type sine and click on Ok The resulting Scicos diagram is illustrated in Figure 3 9 0900 Untitled edited File Diagram Palette Edit View Sim Figure 3 9 The sine wave generator application after selecting the block identification property 21 AA EVIDENCE OEDDIN Chapter 3 E4Boz Startup 5 You can now save the diagram by selecting File Save You will be requested a filename for the diagram we used sine on this example At this point you are ready to generate code for your first ScicosLab design In the following Sections we will refer to this simple design which is made of a clock a Sine generator and a Scope for performing the code generation and the various analysis steps 3 6 Generating Code In order to be able to generate code the ScicosLab code generator require
15. ation calibrate the output signal by changing the parameters online In case you are going to use E4Box Professional Edition please note that the dispay and tuning of the application parameters can also be done using an E4CoerGUI block moreover signal generation can be enhanced with complex logic thanks to the usage of SMCube state machines 11 AAA EVIDENCE Chapter 1 Introduction 1 3 3 Data Acquisition E4Box Open Edition can be used to easily create a signal acquisition application that directly reads from the data acquisition platform and post process it for visualization on the ScicosLab or on the ORTAILab plot windows In case you are going to use E4Box Professional Edition note that the postprocessing can include postprocessing using SMCube state machines as well as visualization using EACoderGUI blocks 1 3 4 Direct control of the Data Acquisition Card EABox Open Edition is a complete ready to use machine including RTAI and Comedi and thus can be also used to develop standalone applications without the usage of ScicosLab or E4Coder that directly uses the RTAI and Comedi API to implement customized control algorithms and realtime applications 1 4 Documentation EABox includes various open source software projects Additional documentation can be found at the following web sites e For the documentation on E4Box Open Edition please refer to http www e4coder com e4box http www e4coder com content
16. block oo om X o9 UE EO ow AOL o dents 35 4 13 The SENSUR block uu so we eR EURO XU deense dt 36 4 14 The ACTUATOR block 2454 es komo Bo dade de wah ae eb st 36 4 15 The FIFO IN block x3 8 RR hee Rw EREA OS 37 LIS EDO FIFU OUT DIOS sce e ame ee ek AAA 37 4 17 The MBX RCV BLK block 24 42 44 0246 o Row E o Rok a 38 4 18 The MBX RCV NO BLK block a 38 4 19 The MBX SEND IF block rns 39 4 20 The MBX SEND OVW block ce 39 4 21 The SEM WAIT block 2 2l 39 4 22 The SEM SIGNAL block 0 40 4 23 The EXTDATA block 2 2 a 40 dad The LUG block eoe ceo amended ow s 41 1n The EXTGCLOCK DOCK as saaw nde mM Ex ORO ww Al BOB The CORTAL blok o eric G HERG 3 949553 42 A 1 Menu option to add a new user a 43 A 2 This Dialog Box can be used to add and remove users 44 A 3 Menu option to change the Screen resolution 44 A 4 This Dialog Box can be used to change the screen resolution 45 A 5 Menu option to change the Keyboard Layout 45 A 6 This Dialog Box can be used to change the Keyboard Layout 46 A T Menu option to change the Network settings 46 A 8 This Dialog Box can be used to change the Network Settings AT A 9 Menu option to enable remote desktop rn AT A 10 Remote Desktop Preferences window o 48 B 1 Latency
17. board e gt Keyboard Shortcuts x 3 ESA A Main Menu e gt b wd amp Messaging and VoIP Accounts 5 Monitors Mouse Network Connections E Power Management K Preferred Applications Screensaver Sound Choose how other users can remotely view your desktop We Startup Applications Ubuntu One Ubuntu One Windows P Computer File Browser Figure A 9 Menu option to enable remote desktop AT UU EVIDENCE Appendix A Remote Desktop Preferences jw Allow other users to view your desktop w Allow other users to control your desktop Your desktop is only reachable over the local network Others can access your computer using the address 192 168 10 114 or e4box desktop local Security You must confirm each access to this machine Require the user to enter this password Configure network automatically to accept connections Notification Area Always display an icon Only display an icon when there is someone connected Never display an icon KA Figure A 10 Remote Desktop Preferences window 48 E4Box configuration B Performance B 1 Latency Tests Figure B 1 illustrates the latency tests results obtained by E4Box 1 0 To run the test please enter the following command in a shell sudo s cd load modules sh cd usr realtime testsuite latency run 0900 e4box e4box usr realtime testsuite kern latency File Edit View Ter
18. cuts E Main Menu 7 Messaging and VoIP Accounts Ls o Mouse cs Network Connections LJ Network Proxy Wi Personal File Sharing E Power Management K Preferred Applications EE Remote Desktop Screensaver Q Sound FS Startup Applications a Ubuntu One mu Windows Figure A 3 Menu option to change the Screen resolution 44 AA EVIDENCE MBEDDIN Appendix A E4Box configuration Monitor Preferences Refresh rate Ge Rotation momma Panel icon Show monitors in panel Figure A 4 This Dialog Box can be used to change the screen resolution A 3 Changing the Keyboard Layout The Keyboard Layout can be changed using the menu option System Preferences Keyboard as shown in Figure A 5 As a result the Dialog box in Figure A 6 is displayed giving the possibility to change the Keyboard Layout Figure A 5 Menu option to change the Keyboard Layout 45 AAA EVIDENCE MBEDDIN Appendix A E4Box configuration Keyboard Preferences General Layouts Accessibility Mouse Keys Typing Break dal s I Mo Separate layout for each window w New windows use active window s layout Keyboard model Ge lena Options Reset to Defaults Apply System Wide Type to test settings Figure A 6 This Dialog Box can be used to change the Keyboard Layout A 4 How to configure the Network address EABox is configured by default to use DHCP for
19. e 37 AU EVIDENCE Chapter 4 ScicosLab Blocks hbe rev blk MIE aa Figure 4 17 The MBX RCV BLK block Output ports This parameter gives the number of message output ports MBX Name This parameter gives the message box name IP Addr This parameter gives the message box IP address 127 0 0 1 localhost 4 1 5 4 MBX RCV NO BLK block Mbs Rev na blk ME 1 ja Figure 4 18 The MBX RCV NO BLK block The MBX RCV NO BLK block see Figure 4 18 models a non blocking receiving message box The block receives a message only if the whole message can be processed without blocking the calling task only if the mailbox is on a remote host the calling task may be blocked The parameters of the block are Output ports This parameter gives the number of message output ports MBX Name This parameter gives the message box name IP Addr This parameter gives the message box IP address 127 0 0 1 localhost 4 1 5 5 MBX SEND IF block The MBX SEND IF block see Figure 4 19 models a non blocking sending message box The block sends a message only if the whole message can be processed without blocking the calling task only if the mailbox is on a remote host the calling task may be blocked The parameters of the block are Output ports This parameter gives the number of message output ports MBX Name This parameter gives the message box name 38 AA EVIDENCE Chapter 4 ScicosLab Blocks Y Mb Send if W
20. ection A 3 if you want to change the default keyboard layout Moreover please refer to Appendix A 1 if you want to add a new user able to compile and execute the code generated by ScicosLab You are now logged in and ready to start ScicosLab to design your control algorithms see Figure 3 3 17 AA EVIDENCE DORT Chapter 3 E4Box Startup Figure 3 3 You are now logged in E4Box The default monitor resolution is 1600x1200 pixels Please refer to Appendix A 2 for more information how to change the display resolution 3 3 Loading the Kernel modules Once logged in you need to load the necessary Linux Kernel modules In particular this step loads all the RTAI and Comedi Modules which are used when running the code generated from the ScicosLab diagrams To simplify this step E4Box provides you a script to load all the necessary modules To execute the script you can open a shell by selecting on Applications Accessories Terminal on the main menu see Figure 3 4 and enter sudo load modules sh YE Applications Places System gt J j m Calculator e Games gt m CD DVD Creator AB Graphics gt s Character Map B Disk Usage Analyzer r A gedit Text Editor Programming gt P Manage Print Jobs d Science gt a Passwords and Encryption Keys Sound amp Video gt Search for Files Ubuntu Software Center Take Screenshot E Tomboy Notes Use the command line Figure 3 4 You can open a
21. ed in E4Box 50 D Ubuntu repositories 51 List of Figures 1 1 This is EABox The figure shows the box as well as the data acquisition card SOME cs 9 5 94 23 94 9 3453955949 54 2 1 National Intruments PCI 6221 pinout DAQ M Series M Series user Manual from National Instruments 3 1 At boot time you need to select the RTAI kernel 3 2 The E4Box login screen 2 5 xo o9 oom xov eee RRS ox ox y RS 3 3 You are now logged in EABox 3 4 You can open a shell from Applications Accessories Terminal on the LIDIA eenn ER AAA 3 5 You can open ScicosLab selecting Application Science ScicosLab on the main Menu caos AAA 3 6 The ScicosLab screen Please note that the RTAI libraries are loaded by default Please type scicos to start Scicos del The Scicos window 2 29 oco eee XR om Om ee ee A 3 8 How to show the Scicos Palette Tree lll 3 9 The sine wave generator application after selecting the block identification Ree uu xxu hee eee os Wd RW Ww dm m s 3 10 Converting the selected region to a Super Block 3 11 Scicos diagram obtained by grouping the blocks in a Super Block 3 12 Selecting the target ole n 3 13 Set Target properties window sn 3 14 Starting the code generation process lll lr 3 15 Code generation properties window a o 3
22. he parameters of a control algorithm To Open QRTALab you need to open a shell and type qrtailab As a result an empty window is displayed as illustrated by Figure 3 18 gt QRtaiLab Graphical User Interface Project Target View Help 5 33 DAX gt 3 Bo V Sorry no route to target Figure 3 18 QRTAILab main window After that please select the Target Manger icon as highlighted in Figure 3 18 A Dialog box to setup the parameter to connect to the real time application is then displayed see Figure 3 19 You need now to specify the IP Address for the Target machine In this example we can specify 0 zero because the Host and the Target are the same machine Finally you can press the Connect button Once pressed the QRTAILab executable is connected to the RTAI application generated from the ScicosLab Diagram The host is the development machine running ScicosLab and QRTAILab 3The target is the machine running the application automatically generated by ScicosLab 26 AA EVIDENCE MBEDDING TECHNOLOGY Chapter 3 E4Box Startup Y Targets Manager Start Target a Connect to Target Target Elements Connect to Target Target Parameter Connect Name SuperBlock 0 P Adress start Status connected started IFTASK Task Identifier stop Disconnect hard real time mode RTS Scope Identifier RTL Log Identifier Scopes RAL Alog Identifier gs RTE Led Identifier
23. ies 4 1 2 1 COMEDI A D block Y COMED AD comedi CH C We Figure 4 5 The COMEDI A D block The COMEDI A D block see Figure 4 5 models an analog input data channel The parameters of the block are Channel This parameter gives the phisical channel on the device Device This parameter gives the name of the comedi device Range This parameter gives the range of the analog converter Aref This parameter gives the type of voltage reference 4 1 2 2 COMEDI D A block Y COMEDI Dii E comedi CH 0 Figure 4 6 The COMEDI D A block The COMEDI D A block see Figure 4 6 models an analog output data channel The parameters of the block are 32 AU EVIDENCE Chapter 4 ScicosLab Blocks Channel This parameter gives the phisical channel on the device Device This parameter gives the name of the comedi device Range This parameter gives the range of the generated signal Aref This parameter gives the voltage reference type 4 1 2 3 COMEDI DI block Y COMED Dl comedit CH 0 We Figure 4 7 The COMEDI DI block The COMEDI DI block see Figure 4 7 models a digital input data channel The parameters of the block are Channel This parameter gives the phisical channel on the device Device This parameter gives the name of the comedi device 4 1 2 4 COMEDI DO block Y COMEDI CO BR comedit CH 0 Figure 4 8 The COMEDI DO block The COMEDI DO block see Figure 4 8 models a digital outp
24. ith the generated application The parameters of the block are Simulation function This parameter gives the name of the main function Is Block Implicit y yes n no Input Ports Sizes This parameter gives the input ports dimensions Al AMA EVIDENCE Chapter 4 ScicosLab Blocks CRITAI Block Figure 4 26 The C RTAI block Output Port Sizes This parameter gives the output ports dimensions Input Event Ports Sizes This parameter gives the input event ports dimensions Output Event Ports Sizes This parameter gives the output events ports dimensions Initial Continuous State This parameter gives the column vector describing the ini tial state conditions Real Parameter Vector This parameter gives the column vection containing any real parameter used in the block Integer Parameter Vector This parameter gives the column vection containing any integer parameter used in the block Initial Firing Vector j0 no firing Direct Feedthrough y yes nno Time Dependance y yes n no 42 A E4Box configuration A 1 Adding a New User To add a new user and enable it for code generation with ScicosLab you need to follow these two steps e Create the user from the menu option System Administration Users and Groups as shown in Figure A 1 As a result the Dialog box in Figure A 2 is displayed giving the possibility to add and remove users e Once the user is created you need to login as the user and ru
25. kage contains the following items 1 The E4Box PC 2 The NI RC68 68 connection cable 3 The NI CB 68LP connector block 4 A power cable 5 An Ethernet Cable 3 2 Booting E4Box E4Box is developed as a ready to use control oriented dektop PC All the needed software and driver are properly installed and configured as to reduce the time needed to enable users develop their own applications In order to be able to run the code generated by ScicosLab you need to select the RTAI Kernel at boot time this is the default choice see Figure 3 1 The typical line that must be selected in the boot options is similar to the following Linux Kernel 2 6 38 8 rtai kernel 16 AU EVIDENCE Chapter 3 E4Box Startup GNU GRUB version 1 98 1ubuntu13 Ubuntu with Li Ubunt witt Memory test me Memory test me nd keys to select which entry is highlighted o boo ne selected 0S e to edit the commands c for a command line Figure 3 1 At boot time you need to select the RTAI kernel The other options available in the boot menu are related to the default installation of the Ubuntu distribution After the boot the system will prompt a graphical login such as the one visible in Figure 3 2 Figure 3 2 The E4Box login screen The default username and passwords are the following Username e4box Password evidence Please notice that E4Box default keyboard layout is Italy Please refer to S
26. ks o 34 Ll BEDDEN earned se d 34 2123 2 DOS DOCK 99 kneden aa mx xe 39 loo METER MOO 426 vee erkens mcs 39 4 1 4 Generic Sensors ooo 36 ALLAI SENSOR block aaa e wo xo xn do xo oo x 9 vox wg 36 1412 ACTUATOR DIER i nee Xo ean heehee eee Ox ee 36 4 1 5 Realtime Communication and concurrency control 37 Lol FIFO INDOOR 4c nee geen ee tease dew ox 37 dels FIFO DUI DER cn ak we 9 9 ox owe x ox xoxo o 37 4 1 5 5 MBX ROV BLK DOCK 4 csa o2 X oom oo iredi aa 37 4 1 5 4 MBX RCV NO BLK block 38 4 1 5 5 MBX SEND IF block 38 4 1 5 6 MBX SEND OVW block 39 4 1 5 7 DEM WAIT block ico coords 49 x3 39 41 5 5 BEM SIGNAL block a eea vk awe vb awed Seda 40 4 1 6 File system input output o a 2 2222 lees 40 dll EXIDATA DIOE oan ses dex RoRoRGexROR OR x ee eee 40 LLC LOG DIOK eea ema eH e 41 4 1 7 Miscellaneous os 41 ALL BATOLOCK block s oi se c aa edes 41 lets CROI Dok oe conser 41 A E4Box configuration 43 A 1 Adding a New User aa n 43 A 2 Changing the Display Resolution 44 A 3 Changing the Keyboard Layout l sn 45 A 4 How to configure the Network address 46 A 5 Configuring E4Box for remote access lll ln AT B Performance 49 DIL boby DOS 2 xo wh OX o4 ow Xo ee AGE 9 9 mou x OUR Ex 49 C Opensource projects includ
27. l time sine wave generator The parameters of the block are Amplitude This parameter gives the maximum amplitude of the generated sine wave Frequency This parameter gives the frequency of the generated sine wave 30 AU EVIDENCE Chapter 4 ScicosLab Blocks Sine Figure 4 2 The SINE block Phase This parameter gives the pahse of the generated sine wave Bias This parameter gives the bias of the generated square wave Delay This parameter gives the delay on the real time generation 4 1 1 2 SQUARE block Y square m Figure 4 3 The SQUARE block The Square block see Figure 4 3 models a real time square wave The parameters of the block are Amplitude This parameter gives the amplitude of the generated square wave Period This parameter gives the period of the generated square wave msec Impulse width This parameter gives the width of the generated square wave Bias This parameter gives the bias of the generated square wave Delay This parameter gives the delay on the real time generation 4 1 1 3 STEP block The Step block see Figure 4 4 models a real time step The parameters of the block are Amplitude This parameter gives the amplitude of the generated step Delay This parameter gives the delay on the real time generation ol AU EVIDENCE Chapter 4 ScicosLab Blocks Step Figure 4 4 The STEP block 4 1 2 Interaction with the Comedi Librar
28. minal Help e4boxGe4box usr realtime testsuite kern latency sudo run Type C to stop this application RTAI Latency calibration tool period 100000 ns avrgtime 1 s do not use the FPU t start the timer timer mode is oneshot RTAI Testsuite KERNEL latency all data in nanoseconds RTH lat min ovl min lat avg lat max ovl max overruns RTD 1124 1124 1043 RTD 1124 1124 1017 1123 1124 723 1124 1124 673 1124 1124 820 1124 1124 794 1124 1124 752 1123 1124 1010 1123 1124 1048 1124 1124 817 1116 1124 420 1124 1124 778 1123 1124 1034 1124 1124 783 1124 1124 355 1123 1124 299 1124 1124 743 1123 1124 e OO OOo 0o lt gt lt gt lt gt lt gt lt gt gt lt gt lt gt lt gt gt gt Figure B 1 Latency test results Plaese notice that those results could not be considered as wroste case as latency results depends on computer load and number and type of active tasks AQ C Opensource projects included in E4Box EABox integrates the following Open Source projects GNU Linux Distributions Reference Website GNU Linux Distribution Ubuntu 10 04 LTS RTAI http www rtai org da Sercoslab Code generator http www ti supsi ch bucher 90 D Ubuntu repositories EABox follows a default Ubuntu installation with the addition of the softwa
29. n ad Calibration of Control Algorithms EABox Open Edition can be used to perform a complete control prototyping round composed by the following steps e A discrete time control algorithm can be designed using ScicosLab together with a continuous time model of a plant e After that the control algorithm can be simulated to tune the control parameters on the simulated plant e he diagram can then be modified by removing te control plant and adding the data acquisition card custom blocks the need to remove the simulation part of the design is not present when using E4Box Professional Edition since it is based on the E4Coer Toolset in order to generate a standalone RTAI application im plementin the behavior of the control algorithm e Finally ORTAILab can be used to tune the control parameters of the design while the RT AI generated application is running locally on E4Box in this way enabling a run time calibration of the control algorithms 1 3 2 Signal generation EABox Open Edition can be used to easily create a signal generator directly integrated with the data acquisition board The typical steps in this case are e A ScicosLab design generating a reference signal is created and the generated signals are connected with the data acquisition board outputs e The application is generated from the ScicosLab design and it is then run on EA Box e JRTAILab is then used to display the signal generated by the applic
30. n few commands to automatically configure ScicosLab for the user The commands are as follows cd usr src rtai 3 9 rtai lab scicoslab macros make user 45 Applications Places SRE gt Preferences Computer Janitor Help and Support EB Disk Utility About GNOME of Hardware Drivers E4Box Manual pdf Aba Ub B Language Support gE Log File Viewer S Login Screen F Network Tools P Printing NS Software Sources Startup Disk Creator IB Synaptic Package Manager fa System Monitor System Testing ed Time and Date MA Update Manager b TTC me Add or remove users and groups Figure A 1 Menu option to add a new user 43 AA EVIDENCE MBEDDIN Appendix A E4Box configuration LJ 45 Applications Places System gt _ P Z e Users Settings eabok Change Account type Custom Change Password Asked on login Change Figure A 2 This Dialog Box can be used to add and remove users A 2 Changing the Display Resolution The Screen Resolution can be changed using the menu option System Preferences Monitors as shown in Figure A 3 As a result the Dialog box in Figure A 4 is displayed giving the possibility to change the Display resolution 43 Applications Places System DG Preferences d About Me Administration dii Appearance Help and Support Assistive Technologies About GNOME Bluetooth pdf About Ubuntu Broadcast Preferences i Bus Preferences EY Keyboard Keyboard Short
31. ndow Finally to start the code generation process the RTAI RTAI CodeGen item on the RTAI menu has to be selected see Figure 3 14 A dialog box appears see Figure 3 15 where you can specify e the name of the generated application SuperBlock in this example e the path where the generated code is placed home e4box Desktop Examples SuperBlock_scig in this example 29 AA EVIDENCE NOEDDIN Chapter 3 E4Box Startup Figure 3 14 Starting the code generation process 00 Set Block properties File Edit Setting Embedded Code Generation Getvalue Created files Path home e4box Desktop Examples SuperBlo Toolchain Target Board Figure 3 15 Code generation properties window By selecting Ok on the properties window Scicos starts the code generation process The ScicosLab console reports the log produced by the code generation process Figure 3 16 shows the output produced by a successful code generation Please note that the application is automatically compiled as part of the code gener ation process and inserted in the directory one level below the one specified for code generation in our case the generation will generate a SuperBlock executable placed in home e4box Desktop Examples 3 Running the generated code As a result of the code compilation step a RT AI real time application is generated with the name specified by the code generation properties window see Figure 3 15
32. or their continuous support to the RTAI ScicosLab community as well as for providing constant help an suggestions for improving E4Box 13 2 Hardware Software Description This chapter describes the Hardware Software pre installed on the various versions of E4Box Open Edition 2 1 Version 1 0 The following sections describes the hardware and software composing E4Box 1 0 For further informartions or requests on personalized hardware configurations please contact info evidence eu com 2 1 1 Hardware e Mother Board Intel D2550MUD2 e RAM 2Gb e Solid State HD 60 Gb e Data acquisition card National Instruments NI PCI 6221 equipped with CB 68LP connector block and RC68 68 connection cable e Power supply e Not included display keyboard mouse 2 1 2 Software e linux distribution Ubuntu 10 04 e RTAT 3 9 e Comedi 3 9 e Comedilib 0 7 1 6 e ScicosLab 4 4 1 e RTAILab 3 9 an QRATIIab 0 1 9 14 AAA EVIDENCE MOEDDIN Chapter 2 Hardware Software Description 2 1 3 Data Acquisition card NI PCI 6221 E4Box 1 0 includes a National Instruments PCI 6221 equipped with a CB 68LP connec tor block and an RC68 68 connection cable The board users manual and the connector pinout could be fount at http sine ni com nips cds view p lang en nid 14132 ALO AI8 AI GND AI 1 AI 9 AI GND Al 2 Al 10 o Al GND AI 3 c Al 11 AI GND O1 Al SENSE Al4 Al 12 AIGND 6 AIS Al 13 Al GND Al6 amp
33. re packages listed in Appendix C Installing of packages presented by the Ubuntu Update Manager are possible and should not break the functionality of EABox with the exception of the kernel updates As an important remark please note that the updates to the kernel performed by the Ubuntu Update Manager may alter the order of the kernel lists at boot making the default kernel not the RTAI For that reason if you want to run code generated by ScicosLab you need to always boot E4Box with the RTAI kernel as noted in Section 3 2 ol
34. s Graphical User Interface 1 Introduction EABox Open Edition is a ready to use all in one embedded computing box which includes all hardware and free open source software needed to perform automatic generation of code rapid prototyping of control algorithms allowing you to simulate and run complex control schemes Figure 1 1 This is E4Box The figure shows the box as well as the data acquisition card connector EABox Open Edition simplifies all the process of installing compiling and tuning a working system based on open source software This software includes GNU Linux RTAI Comedi ScicosLab as well as the tuning of the kernel drivers and acquisition systems Please note that this is often a long trial and error process which includes the right selection of the specific versions of the software to use and the compilation and testing of the complete system EABox Open Edition is fast You can boot the systems in a few seconds thanks to the included solid state hard drive With E4Box you will be able to AU EVIDENCE Chapter 1 Introduction e Acquire data from both analog and digital devices e Design simulate and run control algorithm e Simulate complex plants both on sinchronized and real time mode The following Chapters will describe the main functionalities of EABox Open Edition as well as its integration with ScicosLab RTAI and Comedi 1 1 E4Box Professional Edition In addition to the E4Box Open Edi
35. s that all blocks in the diagram except the clock must be included in a Super Block To perform this operation all the block and wirings with exception for the Clock block have to be selected and then converted to a Super Block by selecting Diagram Region to Super Block as illustrated in Figure 3 10 The resulting Scicos diagram is illutrated in Figure 3 11 OO sine File Diagram Palette Edit View Context Replot Rename Purge Set Diagram Info Set Code Gen Properties d sine edited File Diagram Palette Edit View Simulate Format Figure 3 11 Scicos diagram obtained by grouping the blocks in a Super Block 22 AA EVIDENCE MOEDDIN Chapter 3 E4Boz Startup After that you need to select the superblock and then go to the menu option RTAI Set Target see Figure 3 12 A Dialog box appears see Figure 3 13 where you will be able to select the target toolchain Moreover you can specify the ode function and the step between sampling in this example we will use the default values provided by the system 00 sine File Diagram Palette Edit View Simulate Format Tools gt AN RTAI CodeGen Figure 3 12 Selecting the target BOO Set Block properties Is File Edit Setting Please fill the following values Getvalue Target rtai Target Board um Ode function ode4 Step between sampling 10 Figure 3 13 Set Target properties wi
36. see Figure 4 14 models a generic RTAI output block parameter The parameters of the block are Input Port This parameter gives the number of inputs Identifier This parameter gives the identifier of the actuator To enter the C code to be compiled and linked the Bock Option dialog block have to be opened e g by double clicking than selecting ok a dialog presenting a skeleton fo the C function will be opened 36 AU EVIDENCE Chapter 4 ScicosLab Blocks 4 1 5 Realtime Communication and concurrency control 4 1 5 1 FIFO IN block Fifoin 0 ji Figure 4 15 The FIFO IN block The FIFO IN block see Figure 4 15 models a multicannel FIFO input The param eters of the block are Number of Signals This parameter gives the number of FIFO signals FIFO Nr This parameter gives the FIFO number Dimension This parameter gives the FIFO dimension 4 1 5 2 FIFO OUT block Fifoout 0 Figure 4 16 The FIFO OUT block The FIFO OUT block see Figure 4 16 models a multichannel FIFO output The parameters of the block are Number of Signals This parameter gives the number of FIFO signals FIFO Nr This parameter gives the FIFO number Dimension This parameter gives the FIFO dimension 4 1 5 3 MBX RCV BLK block The MBX RCV BLK block see Figure 4 17 models a blocking receiving message box The calling task will be blocked until all the requested bytes are received or an error occur The parameters of the block ar
37. shell from Applications Accessories Terminal on the main menu 18 AAA EVIDENCE DORT Chapter 3 E4Boz Startup You will then be asked for the user password the default one is evidence as described in Section 3 2 After inserting it the all the necessary modules will be loaded To run code interfacing with the NI PCI 6221 board you will need to also register the DAQ service To perform this operation you can open a shell terminal and type the command sudo modprobe ni pcimio 3 4 Starting ScicosLab After loading the Kernel Modules you are ready to start ScicosLab ScicosLab can be started from the Applications Science ScicosLab menu as shown in Figure 3 5 and Figure 3 6 BRONS Places System 9 Accessories gt BJ Games E Graphics r internet FFI office i Programming Lp E Sound Video Scientific Computing using ScicosLab y Ubuntu Software Center Iu sl Figure 3 5 You can open ScicosLab selecting Application Science ScicosLab on the main menu 45 Applications Places System gt _ P 5 ScicosLab File Control Demos Graphic Window O Help Editor Toolboxes E4Box Manual pdf ScicosLab 4 4 1 A Simple Matter of Conviction Copyright c 1989 2011 INRIA ENPC Tue Apr 19 12 54 45 CEST 2011 Startup execution loading initial environment shared archive loaded Link done Scicos RTAI Ready gt scicos Figure 3 6 The ScicosLab screen
38. test results 2l 40 About this document This document is the Reference Manual of E4Box Open Edition a ready to use GNU Linux RTAI box including all the open source software needed to perform code generation and control tasks Function of the document The function of this document is to provide a Reference Manual for the various func tionalities offered by E4Box Open Edition Document history Feb 28 2013 Riccardo Schiavi Evidence Srl Released version 0 1 1 0 May 16 2013 Paolo Gai Evidence Srl Released version 1 0 Riccardo Schiavi AMA EVIDENCE Acronyms Acronym Comedi EABox EACoder E4Coder GUI GUI List of Figures Meaning Comedi project Linux control and measurement device interface develops driver tools and libraries for data acquisition E4Box is a ready to use all in one embedded computing box which includes all hardware and software needed to perform automatic generation of code and rapid prototyping of control algorithms E4Coder is a factorized acronym meaning Evidence Erika Enterprise Embedded Coder Initially meant as a code generation tool supporting the ERIKA Enterprise RTOS it is now a general purpose code generation toolset In that sense it can be now also interpreted as Evidence For Coder as a set of tools for simulation and code generation of complex designs E4Coder GUI is the GUI editor for fast prototyping of graphical user interface
39. tion described in this manual E4Box is also available in conjunction with the E4Coder Toolset under the name E4Box Professional Edition With E4Box Professional Edition you will have access to additional tools such as e EACoder Code Generator allowing optimized code generation with support for multithread code generation e 5M Cube allowing the design of parallel finite state machines e EACoderGUI allowing the simulation of interactive GUI panels as well as code generation of Qt applications running on E4Box including both GUI and control part For more information about E4Coder and EABox Professional Edition please refer to http www e4coder com 1 2 Requirements EABox Open Edition is not provided with display keyboard and mouse We tested the system both with USB and PS2 keyboards mices The standard resolution of the display is set to 1600x1200 pixels 1 3 Use Cases EABox Open Edition can be successfully used in a number of scenarios like the ones described in this Section In all these cases E4Box Open Edition can be used to simulate and generate code using ScicosLab and then the generated code can be run immedi ately on the target board in other words the E4Box Open edition is a self contained data acquisition and control system that will enable you to test tune and deploy your embedded control algorithms 10 AU EVIDENCE Chapter 1 Introduction 1 3 1 Simulation Rapid Prototyping Code Generatio
40. uct line can be found at the Evidence web site at http www evidence eu com This document is Copyright 2011 2012 Evidence S r l Information and images contained within this document are copyright and the property of Evidence S r l All trademarks are hereby acknowledged to be the properties of their respective owners The information text and graphics contained in this document are provided for information purposes only by Evidence S r l Evidence S r l does not warrant the accuracy or completeness of the information text and other items contained in this document Matlab Simulink Mathworks are registered trademarks of Matworks Inc Microsoft Windows are registered trademarks of Microsoft Inc Java is a registered trademark of Sun Microsystems in the USA and other countries and are used under license All other trademarks used are properties of their respective owners This document has been written using ATEX Contents 1 Introduction 9 1 1 E4Box Professional Edition e o 10 1 2 Requirements oao aoao a a a a a a 10 io Use Cases nea ne a ee 10 1 3 1 Simulation Rapid Prototyping Code Generation ad Calibration of Control Algorithms lt c2 REG 11 1452 DION DENTRO ee b os omo RESO RA XU RE RS eR EHS 11 oho Data BRUM se seoce strs X33 o9 eee ar 12 1 3 4 Direct control of the Data Acquisition Card 12 1 4 Documentation nuoc a a aE EERE a 12 Los OO cara AAA 13
41. ustrates an example where both the amplitude and the bias of the code corresponding to the Sine block have been modified Please notice that by checking unchecking the batch mode option is it possible to choose if the changes have to be sent one by one or all togheter while pressing the Download button 28 AA EVIDENCE NOEDDIN Chapter 3 E4Bozx Startup 200 QRtailab Graphical User Interface Project sine Block Parameters Options IPARAM 1 Target View Help 283022 Ev Es Ew En Jr a batch mode Gouled Gasc Y File Edit Setting Set RTAl sinus block parameters rtai4 sinus Click to open block or make a link ccm Frequency 1 0 m 0 Target SuperBlock Figure 3 22 Setting block parameters on QRTAILab 29 4 ScicosLab Blocks In addition to the standard Scicoslab blocks the following are the Scicos Block that can be used for code generation purposes The list of all available blocks is available in the Palette Tree see Figure 3 8 to show the Palette Tree 4 1 RTAI Lib Palette The RTAI Lib Palette is available as the last one in the Palette Tree see Figure 4 1 The RTAILLib Palette contains a set of blocks which are useful for interfacing data acquisition cards This Section presents a quick list of the available blocks Palettes Figure 4 1 The RTAI Lib Palette 4 1 1 Mathematical functions 4 1 1 1 SINE block The Sine block see Figure 4 2 models a rea
42. ut data channel If the input value is greater than the threshold value the corresponding channel is set to 1 The parameters of the block are Channel This parameter gives the phisical channel on the device Device This parameter gives the name of the comedi device Threshold This parameter gives the conversion threshold 33 AU EVIDENCE Chapter 4 ScicosLab Blocks B P m COMED Enco romedi CTR O Me E E Figure 4 9 The COMEDI ENCODER block 4 1 2 5 COMEDI Encoder block The COMEDI Encoder block see Figure 4 9 models an encoder data channel The parameters of the block are Counter No This parameter gives the index of the used counter Device This parameter gives the name of the comedi device A PFI This parameter gives the line connected to the encoder A channel B PFI This parameter gives the line connected to the encoder B channel Z PFI This parameter gives the line connected to the encoder Z channel Initial Value This parameter gives the initial value of the counter Enable Index This parameter gives the possibility to use the index signal 0 index disabled 1 index enabled Mode This parameter gives the possibility to select the quadrature mode 0 up down Xl 2 2 X2 4 X4 Map on channels This parameter gives the possibility to map on channel 0 no yes 4 1 3 RTAI Lab blocks 4 1 3 1 LED block Led LED Figure 4 10 The LED block 34 AU EVIDENCE Chapter 4

Download Pdf Manuals

image

Related Search

Related Contents

KitchenAid KCO1005 User's Manual  Mode d`eMploi - JG ANSCHÜTZ GmbH & Co. KG  Herunterladen  User manual  Thomson THS812 TV set-top boxe  Patron Climat 40 Indirect Oil Fired Construction Heater Manual  instruction manual - Sunpentown International, Inc.  

Copyright © All rights reserved.
Failed to retrieve file