Home

Matlab LinCon-8000 User Manual Version 1.0

image

Contents

1. 61 APERIRE RENE UR CREE 62 cert cane 63 65 A 66 ee cM EAM M PM E ACE 67 tata alee 68 Matlab LinCon User Manual bene 70 dcl TT 72 r ud LI M M E ME 73 ESOS mH 74 E E 75 ESOO 76 ESUO Tr 78 FSO CM 79 APPENDIX A CHANGE THE OF LINCON 8000 80 Matlab_LinCon User Manual July 2006 Ver 1 0 3 Matlab LinCon User Manual 1 Introduction The LinCon 8000 embedded controller has been integrated into one of the new generation MATLAB Embedded Controller solution of ICPDAS Therefore Matlab LinCon is a combination of LinCon 8000 embedded controller with MATLAB Simulink Its purpose is to achieve Development of Rapid Controller Platform and it will help the engineers grealy to d
2. Matlab LinCon User Manual July 2006 1 0 15 Matlab LinCon User Manual Copy the rest of the blocks in a similar method from other libraries to the model After all the blocks are copied to the model it should look like the figure below 7 4001 sim Edit View Simulation Format Tools Help D 8202 0 s Noma g d b E d001 sim mdl 100 Its time to connect these blocks To connect one block with another just select one block and position the mouse cursor over the output port of the block Notice that the cursor shape changes to crosshairs Click the left mouse button and move the cursor to the input port of another block and then the blocks are connected However we also need to connect one existed line to the input port of another block This line is called branch line Drawing a branch please follow these steps as follows 1 First put the cursor on the existing line 2 Click the right mouse button and then drag the cursor to the input port of another block 3 Release the mouse button when the cursor shape changes to double lined crosshairs as shown in the figure below Matlab LinCon User Manual July 2006 Ver 1 0 16 Matlab LinCon User Manual d001_sim File Edit View Simulation Format Tools Help D oce em ac m Noma B BES d001 sim mdl Branch Line After finish the connection of these blocks the model should look like the model a
3. For example if we enter 1 1 0 in the Axis field the 8090 driver block should look like as follows 50490 Slot The number of the slot where l 8090 module is located For example choose 2 from the popup list if you have mounted 1 8090 module on slot 2 Matlab_LinCon User Manual July 2006 Ver 1 0 79 Matlab LinCon User Manual Appendix A Change the IP of LinCon 8000 Through the GUI under MATLAB users can change the IP Mask and Gateway of LinCon 8000 embedded controller conveniently We will demonstrate how to complete this work Step 1 Start MATLAB and then enter gui8000 at the MATLAB prompt MATLAB ile Edi 1 p BL r 1 elp S Current Directory Command Windows D SMATLABG pS work v amp 11 Files File Type Last Modifie Using Toolbox Path Cache help toolbox path cache for ma To get started select MATLAB Help from the Help menu Tg test Folder D1 4 H 30 7 test MoFile Folder 27 2005 gt 8018000 tcpdata mat D 18000 Series User Interface tcpdata txt 1 test exe H test md Connect Connect to 1 test MoFile exe test NoFile ndl atap 192 168 a 200 Port 10000 Set MET Message Made Exit GUI Workspace Command History ee STAT US Not Connected Download Upload Start Busy Step 2 En
4. Matlab LinCon Driver Ver1 0 or in the web path http www icpdas com products PAC lincon 8000 download htm can be downloaded The files listed should look like the figure below Double click Setup exe to start the installation procedure 3 m S IM E layout bin lang dat Z zvsl hdr dr datal hdr setup lid DATA TAG cab datal cab SETUFINI tup mns gas _TisDel exe Senin e setup dll setup bmp Step 2 An ICPDAS MATLAB LinCon solution logo will appear and then click Next button to continue Matlab LinCon User Manual July 2006 Ver 1 0 9 Matlab LinCon User Manual Download Upload LinCon 8000 Ynrimemerimmnni Signal Feedback Control Output Welcome to the Matlab Driver for 18000 Setup program This program vall install Matlab Driver Far 18000 on pour computer It is strongly recommended that pou exit all Windows programs before running thes Setup program Click Cancel ta qut Setup and then close any programs you have running Click Next to continue with the Setup program WARNING This program is protected by copyright law and inhemational treaties Unauthorized reproduction ar distribution of this program or portion of t may result i severe civil and cnminal penalties and wall be prosecuted to Ihe masmunm extent possible under lav The Welco
5. TO WORK WITH 2 0 2 020022227 13 3 1 CREATE A CONTROL MODEL USING SIMULINK cccscececcececcececcscececcecesceceses 13 oo SIMULINK MODEL COMBINES ICPDAS DRIVER eene 19 3 3 BUILD THE MODEL TO EXECUTABLE FILE BY RTW nnnm 22 3 4 PROGRAM DOWNLOADING amp DATA UPLOADING 0 0 010 0 r enis 26 2232 WORKING WITH Spei esie bei oO Mes 30 32 Zl Dr wan Said 32 CS 35 2 2169 0102 ene 39 WA RELAY MODULES 45 253 ENCODER MODULE 48 5 MATLAB DRIVER BLOCK 53 SIS INI 53 IO SPA 54 READBROMBEP3 ice ULP 55 WRITE IOPE P Coe 56 EEEE E E EE E EAE E EE ETTE 57 Ee 0 9 74 Tae aE Wee OT 59
6. a complete system in an integrated software environment 4 extensibility of I O driver blocks This Matlab LinCon solution is based on the LinCon 8000 controller which provides 3 or 7 expansion slots Currently Matlab LinCon driver provides over 20 I O blocks to cooperate with Matlab development environment which including DI DO DIO Al AO and Relay blocks More I O blocks will be supported in the future 5 Open Source Code The source code produced by Matlab RTW is open for users Matlab LinCon User Manual July 2006 Ver 1 0 5 Matlab User Manual 1 3 Limitations The MATLAB LinCon Driver only supports single tasking and Fixed step modes due to the limitations of the RTW Embedded Coder 1 Single tasking In Simulink single tasking means that only one sample rate can be used in the whole control system That is every block must have the same sampling rate It is suggested that users set the Sample time to be 1 when the option is available in the block Block Parameters Step Xx sten Output step Parameters Step tme LL Initial value B MM Final value sample time D w Interpret vector parameters as 1 D Enable zero crossing detection s og dms 2 Fixed step Because the RTW 4 x or 5 0 have not supported variable step time the Solver options on the Simulation Parameters dialog box can only be s
7. box and select the slot number where 8057 module is mounted in the LinCon 8000 Matlab LinCon User Manual July 2006 Ver 1 0 33 Matlab LinCon User Manual Block Parameters 1 8057 s Function mask Tsolated output module Parameters Sot Step 4 two Gain Sum blocks to the model from the Simulink Math Operations library Step 5 Connect all the blocks as shown in the following figure File Edit View Simulation Format Tools Help 1 uL amp Le boc Normal E ICPDAS Lincon 4000 Embedded Controller SYS INIT Digital Output Slot 2 Constant Step 6 Build the model to executable file The process are all the same as section 3 3 Matlab_LinCon User Manual July 2006 Ver 1 0 34 Matlab LinCon User Manual 4 2 Al Modules In this section we will introduce how to use the Al driver block and a demo model will be presented Floating or Hex Input Type The driver block supports two types of input values floating and hex When the input type is set to floating the output port will output a value which is the same with the voltage measured from the corresponding channel If the input type is set to hex the output port will output a value between 8792 and 8191 This value is affected by the Voltage range ex When the voltage range is set to 10V the output port will output a value 4096 while
8. choose 2 from the popup list if you have mounted 1 8054 module on slot 2 Scaling Input to Output digital input Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 68 Matlab LinCon User Manual Scaling Input to Output digital output Block Input Value Hardware Output TT All channels are off is on and the others are off Ch1 is on and the others are off All channels are on Matlab LinCon User Manual July 2006 Ver 1 0 69 Matlab LinCon User Manual 5055 Description 16 channel Non isolated Digital I O Module Library DIO Dialog Box Block Parameters 1 8055 1 X s Function mask Non isolated digital input 52 output module Parameters DI Channel 101234567 Driver Block Parameters DI Channel Enter numbers between 0 and 7 This block allows the selection of digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter O 1 2 3 4 5 6 7 Slot The number of the slot where l 8055 module is located For example choose 2 from the popup list if you have mounted an 1 8055 module on slot 2 Scaling Input to Output digital input Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 70 Matlab LinCon User Manual Scaling Input to Output d
9. demonstration uses 2 DO channels of l 8057 module and 2 DI channels of 8053 module to test the digital input and digital output function The digital output channels are connected to digital input channels The following steps describe how to create and implement the experiment of digital input output modules Step 1 Create new model window and copy SYS INIT 8053 and l 8057 blocks from the System DI and DO library to the model window respectively Matlab LinCon User Manual July 2006 Ver 1 0 32 Matlab LinCon User Manual 7 Simulink Library Browser File Edit View Help Gee Sal Find 1 8053 Isolated digital input module zingle ended EE Tigh Simulink d 1 5040 l Aerospace Blockset CDMA Reference Blockset ek Communications Blockset l 5051 Control System Toolbox Dials amp Ganges Blockset 1 8052 Embedded Target for ICFDAS 9 AI D AC 5 1 8059 2 DI 5 DIO 2 Encoder 3H 2 Encoder H RELAY v lt _ Ready Step 2 Double click on the 8053 block and type 0 1 in the Input channel field And select the slot number of the 1 8053 module that is according to the position of 8053 in the LinCon 8000 Block Parameters 1 8053 Fimetion mask Tsolated digital input module inele ended Parameters Input channel im 2101 a m my Step 3 In similar method open the 8057 dialog
10. from the Simulink Sources library Matlab LinCon User Manual July 2006 Ver 1 0 42 Matlab LinCon User Manual rm smnulmk Library Browser jm File Edit View Help G al Find Sine Wave Outputs sine wave where the sine type determines the computational technique used The in the two types related thiugh Samples per period Z pi Frequency Sample trel From Workspace untitled mat From File E v Simulink Continuous 22 Discontinuities 2r Discrete Be Look Up Tables 2 Math Operations ES E Model Verification 2 Model Wide Utilities B Ports amp Subsystems BH Signal Attributes Pulse Generator B Signal Routing M inl Ramp E r Detined Functions Padom Number g Aerospace Blockset E Buffered DSP m MI CDMA Reference Blockset A Communications Blockset SUHE Wi Control System Toolbox DSP Blockset E Dials amp Gauges Blockset Embedded Target for ICPC A sma Signal Builder e File Edit View Sianulation Format Tool Help ICPDAS 64 58 Embedded Controller SYS IMIT im Sine Wavre IC PDAS DataToFile Black LBn17H DataToFile 100 T 0 00 Fixed StepLiserete 7 Matlab_LinCon User Manual July 2006 Ver 1 0 43 Matlab LinCon User Manual Step 8 Click Simulation parameters from the Simulation me
11. the corresponding channel acquires a 5V analog input Block Parameters I BU1 7H X s Function mask 14 bit 100 sampling rate 8 channel analog input module Parameters Channel 0 1234567 Voltage rangs e 10v Slot 0 of Value Floatne Demonstration This demonstration uses 1 8017H and 1 DataToFile driver block to test the analog input function By using the DataToFile driver block the data acquired from the 8017 module can be uploaded to PC for analysis The following steps describe how to create and implement the experiment Step 1 Create new model window and copy SYS 8017 and Data ToFile blocks from the System and A library to the model window respectively Matlab LinCon User Manual July 2006 Ver 1 0 35 Matlab LinCon User Manual ge Simulink Library Browser raj x DataToFile Wate time and inpat to specified file in me format Time H WE Simulink H W Aerospace Blockset ow l Ca ToFile Wi CDMA Reference Blockset a H MN Communications Blockset 12 22 svs mur BEER ox Wi Control System Toolbox H M Blockset at WE Dials amp Gauges Blockset W Embedded Target for ICPD wee gt AI gt AO DI J DIO DO Encoder ended Target for ICPD 2H DI 2H DIO Step 2 Double click on the 8017 block and then the dialog box appears In
12. to start to convert the model to executable file simulation Parameters d001 act Solver Workspace 0 Diagnostics Advanced Real Time Workshop Category target configquaton Bud Configuration system target file LinCon tlc Browse Template makefile Make command mskeliCon Generate cade only Stateflow options Step 8 After the process completed successfully the message in the MATLAB command window looks like as the following figure MATLAB Sel File Edit View Web Window Help Dg s Eo c Curent Directory Current Directory x Command Window DENTIS WATLAB Dem 7 p E Writing header file 01001 act h 1 Writing header file 4001 act twpes h Heg Writing header file 0001 act private h 401 Writing source file 0001 act data c d001 act exe SE Writing header file sutabuild h 1001 EF ILC code generation complete 2001 _sim md All Files PEE Include Fixed Point Blockset directories UE 4001 act mk which is generated from D HATLABApS rtwic L tmf is up te 002 nd 88 Duilding 4001 act act bat f 2003 nd arm linux gec c DHODEL d001 act DERT DNIMST 1 DONESTEPFGN 1 IC evewinMLintic am linux gcc c DMUDEL d00 act IERT DMUMST l IC evewin Lintc arm Tinux gcc c DHODEL d001 act DERT DNIMST 1 DOMESTEPECN l I amp cvewinMLinit am linux gcc D REENT
13. to the model please follow these steps Step 1 Add the SYS INIT block from the System block library Simulink Library Browser Bue Edit View Help 5 pm el Find SYS INIT Initislize the EDO contiol system Wl Aerospace Blockset T CDMA Reference Blockset H Communications Blockset Control System Toolbox Dials amp Gauges Blockset Embedded Target for ICPDAS Linlon S000 J 2 AI By DI 2 DIG no Se Encoder RELAY Step 2 Remove the Plant subsystem block 8024 and an 8017 block from the Al and AO library respectively Simulink Library Browser zl led File Edit View Help D 244444442272 Aerospace Blockzet File Edit View Help Gee HA Find 1 i4 bit 100 Sohal analog input oile E Teh Simulink Bab Aerospace Blockset CDMA Reference Blockset Encoder i Wl Communications Blockset RELAY Wh Control System Toolbox Zh System D is Disks amp Gauges Blockset Wh Embedded Target for ICPDAS LinCon 8000 Matlab LinCon User Manual Step 3 Replace the Scope block with the DataToFile driver block Simulink Library Browser File Edit View gE fd 22 DataToFile Wate tive and input to specified MAT file in vow formet Time is in acr 1 5 Simulink o Aerospace Blockset CDMA Reference Blockset Commun
14. 090 block to setup the encoder module Here we use X axis of the 1 8090 module which is mounted on slot 1 of the l 8xx8 embedded controller And select the counting mode as Quadrant Matlab LinCon User Manual July 2006 Ver 1 0 50 Matlab LinCon User Manual Block Parameters 8090 b Function mask Sass encoder counter board Parameters Step 4 Configure the 8024 block Please refer to the section 4 1 and 4 3 Step 5 Add a DataToFile block from the System block library and use to store the data of the encoder At the same time insert a Constant block to send the voltage command to the 1 8024 block Step 6 Connect all blocks as shown in the following figure ini x File Edit View simulation Format Tools Help Hl ICFDAS S635 Embedded Controller 5 5 Constant ICPDAS DataToFile Block DataToFile 100 coded 5 2 Step 7 Click Simulation parameters from the Simulation menu to open the Simulation Parameters dialog box Then configure the RTW options Matlab_LinCon User Manual July 2006 Ver 1 0 51 Matlab LinCon User Manual refer to section 3 3 and press the Build button to start the build process Step 8 When the build process ends successfully download the exe file generated to the LinCon 8000 and run it refer to section 3 4 Matlab_LinCon User Manual July 2006 Ver 1 0 52 Matlab LinCon User Manual 5 Matlab Driver Blo
15. D h o C O 5053 Description 8 channel Isolated Digital Input Module Library DI Dialog Box Block Parameters 1 2058 X s Function mask B channel Isolated Digital Input Module Parameters Input channel 012345671 Driver Block Parameters Input channel Enter numbers between 0 and 7 This block allows the selection of individual digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter 01234596 7 Slot The number of the slot where l 8058 module is located For example choose 2 from the popup list if you have mounted an 1 8058 module on slot 2 Scaling Input to Output Hardware Input Block Output Value AC DC 30V max 0 AC DC 80V mini 1 Matlab_LinCon User Manual July 2006 Ver 1 0 74 Matlab LinCon User Manual 5060 Description 6 channel Relay Output Module Library RELAY Dialog Box Block Parameters 1 4060 Ax s Function mask Relay output module Parameters Relay Channel 012345 Driver Block Parameters Relay Channel Enter numbers between 0 and 5 This block allows the selection of relay output lines in any order The number of elements defines the number of relay outputs used For example to use the first 6 relay outputs enter O 1 2 3 4 5 Slot The number of the slot where 1 8060 module is located
16. For example choose 2 from the popup list if you have mounted an 1 8060 module on slot 2 Scaling Input to Output Block Input Value Hardware Output gt 0 Switch to lt 0 Switch to NC Matlab_LinCon User Manual July 2006 Ver 1 0 75 Matlab LinCon User Manual l 8063 Relay Val 5083 Description 8 channel Isolated Digital Module Library DIO Dialog Box Block Parameters 1 8063 Driver Block Parameters DI Channel Enter numbers between 0 and 3 This block allows the selection of digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 4 digital inputs enter O 1 2 3 Slot The number of the slot where 8063 module is located For example choose 2 from the popup list if you have mounted an 1 8063 module on slot 2 Scaling Input to Output digital input Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 76 Matlab LinCon User Manual Scaling Input to Output relay output Block Input Value Hardware Output a All channels are switched to NO 1 Ch0 is switched to NO and the others remain NC 2 2 is switched to NO and the others remain NC All channels are switched to NC Matlab LinCon User Manual July 2006 Ver 1 0 TI Matlab LinCon User Manual l 8064 C oh 2064 Description 8 channel P
17. Matlab LinCon User Manual Matlab LinCon 8000 User Manual Version 1 0 Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assume no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2005 by ICP DAS All rights are reserved Trademark The names used for identification only maybe registered trademarks of their respective companies Matlab_LinCon User Manual July 2006 Ver 1 0 1 Matlab LinCon User Manual Table of Contents 25 4 1 1 HARDWARE SPECIFICATIONS FOR LINCON 8000 eren 4 E 5 bos E Ee c E 6 1 4 MODULE LIST SUPPORTED FOR MATLAB LINCON DRIVER 8 2 SOFTWARE 9 2h DRIVER INSTALLATION 2 occ St asec ooo eee Sees 9 3 HOW
18. Matlab LinCon User Manual ReadFromEEP ReadFromEEP Function Read data from EEPROM Library System Description In this block there is no parameter for users to set To use this block properly what users have to do is to assign the intended value to input ports Block and Addr And the data read from eeprom will be exported to the Data port More details of these ports are given as follows 1 Block This parameter specifies the number of the 5 block from which you want to read For LinCon 8000 its range is between 0 and 255 2 Addr A value between 0 and 64 is acceptable In LinCon 8000 the eeprom is divided into 256 blocks and each block is 64 bytes If you want to obtain the data of Block 1 Offset 60 you would assign 1 to Block and 60 to Addr 3 Data It will output a value between 0 and 255 according to the setting of Block and Addr number Matlab LinCon User Manual July 2006 Ver 1 0 55 Matlab LinCon User Manual Write ToEEP WriteTaEEF Function Write data to EEPROM Library oystem Description This block is used to write data to EEPROM one byte per loop To operate this block correctly you need to keep some details in mind They are given as follows 1 Block In the LinCon 8000 control system the eeprom is divided into 256 blocks The number of the block is counted from O to 255 2 Addr In each block of the eeprom it is 64 bytes in size
19. RANT IC cyewin LinCon k inelude IC eveuin lincenBk ern lin EF Created executable 4001 act exe sed Successful completion of Real Time Workshop build procedure for model 4001 act Workspace Current Directory Matlab LinCon User Manual July 2006 Ver 1 0 25 Matlab User Manual 3 4 Program downloading amp data uploading After the build process is completed the executable file will be generated automatically Then the GUI communication interface will appear later So users can download the exe file to the LinCon 8000 embedded controller through it Or users can type gui8000 at the MATLAB prompt and the GUI communication interface will also appear The GUI figure shows as below T8000 Series User Interface Connect to ie ie o 200 Port 10000 Gal MET Message Made m Exit Gu Not Connected Please follow these steps to download the program to the LinCon 8000 target system Step 1 Type gui8000 at the MATLAB prompt and the GUI will appear Then type the LinCon IP address like 192 168 0 200 in IP field of GUI and port number is 10000 default for LinCon Server which is placed in the mnt hda matlab mat server exe of LinCon Then click the connect button and the message of Connection is established will show up Note Remember to setup network of PC and the LinCon 8000 in the same LAN Then the co
20. So users can assign a value between 0 and 63 to this port 3 Data data that you want to write to the eeprom A value between 0 255 is meaningful Matlab LinCon User Manual July 2006 Ver 1 0 56 Matlab LinCon User Manual 8017 ok 1k zb 3b 4L 5k BE 5017H Description 8 channel Isolated Analog Input Module Library Al Dialog Box Block Parameters 1 801 7H Xx s Function mask 14 bit 100E samplim rate 8 channel analog input module Parameters E 1234507 Voltage range 1 25V Driver Block Parameters Channel Enter numbers between 0 and 7 This block allows the selection of analog input lines in any order The number of elements defines the number of analog inputs used For example to use the first 8 analog inputs enter 0 1 2 3 4 5 6 7 Voltage range The 1 8017H Al module provides 4 ranges of the input voltage and they are 10V 5V 2 5V and 1 25V Slot The number of the slot where I 8017H module is located For example choose 2 from the popup list if you have mounted an 1 801 module on slot 2 Type of Value Floating or Hex is available The table below presents the list of ranges of the input voltage Matlab_LinCon User Manual July 2006 Ver 1 0 57 Matlab LinCon User Manual Type of Value Hardware Input Block Output Value Matlab_LinCon User Manual July 2006 Ver 1 0 58 Matlab LinCon User Manual 2024 Descri
21. ancel Workspace Current Direc Command History Busy Step 5 If the process was completed successfully the connection will be Matlab_LinCon User Manual July 2006 Ver 1 0 81 Matlab LinCon User Manual terminated Users will need to do the connection again 18000 Series User Interface Connect Connect to Start ip 132 ie a 200 red Port 10000 fern Connection I terminated Exit GU STATUS Matlab_LinCon User Manual July 2006 Ver 1 0 82
22. ced Real Time Workshop Simulation tire Start time 0 0 Stop time 20 Solver apntinns Fixed step Fixed step size 0 005 Output options Matlab LinCon User Manual Step 3 Then click the Real Time Workshop tab and select Target configuration item from Category field Then click the Browse button to open the System Target File Browser window simulation Parameters d001 act Solver Workspace 1 0 Diagnostics Advanced Real Time Workshop Categori Target canfiguratian Configuration System target file Enote 000000000 Template maketile Make command make LinCon Generate code only Stateflow options Step 4 On the System Target File Browser dialog select the LinCon 8000 Embedded Target option and then click the OK button System larret File Browser d001 act Jyatem target Tile Description jazeap2 tlc ASAM ARAE2 Date Definition Target DOS 4GW Real Time Target RIW Embedded Coder Visual C C Project Makefile only for the Embedded Coder Generic Beal Iime Wisunl CFG Ercject Makerile only tor the gri target Generic Eeai Iime Target with dynamic memory allocation E Llc malloc target LinCon 8000 Embedded Target prod od 0 role Meco iBlgorittm export Embedded Target for Mnrtorala MPC555 nrocesacor ing rtbe Inon Embedded larget fnr Motorola MPC555 real ci
23. ck Reference This section presents detailed descriptions and usage of all blocks in the MATLAB Driver block library SYS INIT ISPDAS LinCan S rnt Embedded Controller orae Description Initialize the LinCon 8000 control system Library system Dialog Box Block Parameters 5 5 INIT LinCon 8000 Sinulink link mask Initialize the 9000 control system Parameters LinCon8000 2 Cancel Help Driver Block Parameters Target Hardware The type of the LinCon 8000 control system is fixed and users doesnt setup it Matlab LinCon User Manual July 2006 Ver 1 0 53 Matlab LinCon User Manual DataToFile ICPDAS DataToF ile Black DataToF ile Description Write time and input to specified MAT file in row format Time is in row 1 Library system Dialog Box Block Parameters DataToFile s Function mask Write tme and input to specified file in row format Time 12 row 1 Parameters Filename tcpdata mat 1 Driver Block Parameters Filename The field is fixed and users cant modify it The default filename is tcpdata mat The file will be stored in the current working directory after uploading Decimation A decimation factor The default value is 1 This parameter allows you to write data at every n th sample where n is the decimation factor Matlab_LinCon User Manual July 2006 Ver 1 0 54
24. er input modules are used to accept signals from encoders on the motors Therefore the 8000 series module MATAB Driver also provides the driver block for l 8090 which is a 3 axis encoder counter board on l 8000 platform By using the l 8000 series module MATLAB Driver you can design your motion controller easily and quickly In the following paragraphs we will show you the usage of the 1 8090 driver block Introduction of l 8090 driver block On the dialog box of l 8090 driver block you can select the counting mode of the 8090 among Quadrant CW CCW and pulse direction The setting in this field must match with your wire connections Otherwise the measurement of data will not be correct To get more information about wire connections please refer to the 1 8090 8091 user s manual Block Parameters 1 5090 X s Functian mask 3 axis encoder counter board Parameters Lard NO The difference among quadrant CW CCW and pulse direction counting modes is shown in the following figures Quadrant counting mode Matlab LinCon User Manual July 2006 Ver 1 0 48 Matlab LinCon User Manual Cw CCW counter 2 E CW CCW counting mode Pulse Direction counter l 2 4 2 Pulse Direction counting mode The Card field on the dialog of l 8090 driver block is not used in the LinCon 8000 and users don t care this field e Functio
25. et to Fixed step simulation Parameters untitled IOl x Solver Workspace 1 0 Diagnostics Advanced Real Time Workshop Simulation time Start time 0 0 Stop time 10 0 Solver aptian discrete continuous states Fixed step size 0 002 SingleT asking Output options Refine output factor 1 Cancel Help Apply Furthermore the RTW Embedded Coder does not support the following Matlab_LinCon User Manual July 2006 Ver 1 0 6 built in Simulink blocks yet 1 Simulink Continuous No blocks in this library are supported Simulink Discrete First Order Hold Simulink Function and Tables MATLAB Fen Simulink Math Algebraic Constraint Matrix Gain Simulink Nonlinear Rate Limiter Simulink Signals amp System Bus Selector IC Simulink Sinks XY Graph Display To File Simulink Sources Clock Chirp Signal Pulse Generator Ramp Repeating Sequence Signal Generator Matlab_LinCon User Manual July 2006 Ver 1 0 Matlab LinCon User Manual Matlab LinCon User Manual 1 4 Module list supported for Matlab LinCon Driver The following table is list of currently supported 1 8000 I O modules by Matlab LinCon Driver They include DI DO DIO AI AO Relay and Encoder modules If users want to get more information about the specification or function of these modules please
26. evelop their own controller In the LinCon 8000 it provides VGA 5 2 USB gt Ethernet Series ports CF Card and I O expansion slots for Matlab development environment For this application there have been over 20 I O bridges and system level Simulink Blocks developed and built in Matlab Simulink Blockset By using Simulink development environment and these Matlab Driver s l O blocks control algorithm can be easily constructed and verified Once the algorithm has been verified users just click a build button and the simulink model will be converted to executable file The process from model to executable file is without writing any code Then download the executable file to the LinCon 8000 embedded controller for test or practical application via Ethernet TCP IP communication It also provides users to upload the experimental data for further analysis to improve the result All in all engineers can put more focus on advanced control algorithm design and development 1 1 Hardware Specifications for LinCon 8000 General environment Operating temperature 25 C to 75 C Storage temperature 30 C to 85 C Humidity 5 9596 Built in power protection amp network protection circuit System Specification CPU Intel StrongARM 206MHz SDRAM 64M bytes FLASH ROM 32M bytes EEPROM 16byte 2 5 232 5 485 Ethernet 10 BaseT Real Time Clock Built in 64 bit hardware unique serial number Built in Wa
27. ications Blockset Wy Control System Toolbox H Dials 5 Gauges Blockset Embedded Target for ICPDAS LinUon 8000 H AI 2H 2 DI DIO H Do 2 Encoder RELAY H system 77 4001 act File Edit View Simulation Format Tools Help D 9001 act mdl Ssturstion 8024 Integrator Feedback Signal Collection ISPDAS DataToFile Black DataToFile 8017 Al Fixed StepDisorete Matlab_LinCon User Manual July 2006 Ver 1 0 20 Matlab LinCon User Manual After the above steps are done the model with the ICPDAS 1 8000 driver blocks is ready for built into the executable file Matlab LinCon User Manual July 2006 Ver 1 0 21 Matlab LinCon User Manual 3 3 Build the Model to Executable file by RTW In this section we will introduce how to convert the model created in the previous section into an exe file by RTW Please follow these steps Step 1 Click the Simulation Simulation parameters 71 d001_act File Edit View REET Format Toole Help amp CHE simulation parameters 0001 act Mechanical environment ICPDAS v Normal LinCon 8000 Accelerator Embedded Controller 8YS INIT Step 2 On the dialog box that displays select Type as Fixed step Mode as Single Tasking in the Solver options field simulation Parameters dil act solver Workspace Diagnostics Advan
28. igital output Block Input Value Hardware Output TT All channels are off is on and the others are off Ch1 is on the others are off All channels are on Matlab_LinCon User Manual July 2006 Ver 1 0 Matlab LinCon User Manual l 8056 Digital Output Slot 5056 Description 16 channel Non isolated O C Output Module Library DO Dialog Box Block Parameters 1 50 56 X s Function mask Non isolated O C output module Parameters Driver Block Parameters Slot The number of the slot where 8056 module is located For example choose 2 from the popup list if you have mounted an 1 8056 module on slot 2 Scaling Input to Output All channels are off is on and the others are off All channels are on Ch1 is on and the others are off Matlab LinCon User Manual l 8057 Digital Output Slot 5057 Description 16 channel Isolated O C Output Module Library DO Dialog Box Block Parameters I 8057 s Function maski Taolated OC output module Parameters Driver Block Parameters Slot The number of the slot where l 8057 module is located For example choose 2 from the popup list if you have mounted an 1 8057 module on slot 2 Scaling Input to Output All channels are off is on and the others are off All channels are on Ch1 is on and the others are off Matlab LinCon User Manual l 8058
29. ile Edit View Help Ge Find PO DataTIoFile Wate tire and input to specified file in row formet Tire is im vow 1 ll Embedded Target for ICPD A DataToPile t EH AO m P DI XE eam J DIO B DO Encoder E AY System 7 i Step 3 In a similar manner insert an l 8024 block and an l 8017H block separately from the AO and Al block library Simulink Library Browser Lm x File Edit View Help Gm HA Find 0 14 100K sarnpling 2 analog input Control System Toolbox DSP Blockset H E Dials amp Gauges Blockset il Embedded Target for ICPDAS iL Control System Toolbox H Gl DSP Blockset H E Dials amp Gauges Blockset H E Embedded Target for ICPDAS D DIO Step 4 Double click on the 1 8024 block to setup the AO module Here we use channel 0 of the l 8024 module which is mounted on slot 2 of the l 8xx8 embedded controller And the output mode is set to Voltage Out the type of value is selected as Floating Matlab LinCon User Manual July 2006 Ver 1 0 41 Matlab LinCon User Manual File Yw Simulation Format ooh Help Dc Ed db Sg Step 5 As to the setting of SYS INIT and 8017 please refer to the section 4 1 and 4 2 Step 6 Add a Sin Wave block
30. ing boolean data OF Cancel Help Apply Step 4 Click the RTW Build button to start the build process When the build process is completed successfully an executable file will be created in the current directory Stateflow Target Builder IZ Ie Target Name tw Real Time Workshop Parent machine doo Target Language ANSI C Real Time workshop build Target Options Coder Options 7 Iw Lise settings for all libraries Desciption Document Link Cancel Help Apply Matlab LinCon User Manual July 2006 Ver 1 0 3 Matlab LinCon User Manual 4 Demos In the following sections we will introduce the usage of the I 8000 driver blocks by a series of demos including DI DO Al AO and Relay 4 1 DI amp DO Modules Introduction Digital I O interfaces are frequently used for the control system In this section we will guide users how to use the and DO driver block by an 053 module and an 1 8057 module The 8057 driver block expects a value smaller than 65535 from its input port This is because l 8057 module is a 16 channel digital input module If you assign a value 5 to the 8057 module then the channel 0 and channel 2 of the 8057 module will be set ON The 8053 driver block will output a value 1 from the individual port if the corresponding channel of the module acquires a digital input Otherwise it will output a value O Demonstration This
31. me dialog box Step 3 The Installation directory for MATLAB dialog box shows the current directory information that MATLAB software has been installed as Matlab LinCon User Manual July 2006 Ver 1 0 10 Matlab LinCon User Manual shown in the figure below The default MATALB folder is C Matlab6p5 If MATALB 6 5 was not installed on the default path users must click the Browse button to choose the correct path Otherwise the MATLAB Solution Toolkit will not work properly Press to the next step specitv the MATLAB root directory X Please specify the MATLAB root directory in your system By default it is located in the folder IF the default value matches with your setting click Next to continue Otherwise click Browse and select another folder Tou can choose not to install ICP DAS MATLAB Solution Toolkit for 8 38 by clicking Cancel to exit Setup Destination Folder a CAMATLABEDS Cancel Specify the MATLAB root directory Step 4 After copying files has been completed successfully the Setup Complete dialog box appears Click Finish to exit the installation program setup Complete Setup has Finished installing ICP DAS MATLAB Solution Toolkit for 8x38 on Your computer Setup can launch the Head Me file and ICF DAS MATLAB Solution Toolkit Far I 8x38 Choose the options want below Click Finish to complete Setu
32. me rardget LE O Lynx Embendded E Rapid Simulation larger Reat lime Windows Target S function Target Target for Texas Instrumentsaite IBMS3Z20C580D00 DSP Torna VxWorks Beai Iime Isrget mE Beye Loe ie ag ER Real Time Target amp i Os B ZXMATLAB6p5XrtwXcAI BxxoVXLinCon tlc Matlab LinCon User Manual July 2006 Ver 1 0 23 Matlab LinCon User Manual Step 5 Select ERT code generation options 1 for MATLAB 6 5 in the Category field Check the Terminate function required and Single output update function options on the pane simulation Parameters d001 act Options MAT fle logging Integer code only internal data nitializecexternal 10 data Mw Terminate function required Single output update function Insert block descriptions in cade Step 6 For MATLAB 6 5 you have to select ERT code generation options 3 from the Category field Cancel Generate an example main program option simulation Parameters 001 act Category Options Generate an example main program Target operating system Generate reusable code Reusable code error diagnostic luo e Suppress error status iri real time model data structure Target floating paint math environment Matlab_LinCon User Manual July 2006 Ver 1 0 24 Matlab LinCon User Manual Step 7 When the above steps finished click the Build button
33. n mask S axiz encoder counter board Counts Made Quadrant Axis 11 Slot 1 DE Cancel Demonstration This demo uses an l 8024 AO module to drive the motor and an 1 8090 encoder input module to accept the signals from the encoder of the motor And we also add a DataToFile block to the model for data recording Here we will show you the procedure step by step Step 1 Create a new model in Simulink and insert a SYS INIT block from the oystem block library Matlab LinCon User Manual July 2006 Ver 1 0 49 Matlab LinCon User Manual Library Browser Bl File Edit View Help 1 m Find ofo INIT the HIDD contol system li Control System Toolbox TE B 4 DSP arret for Motorola ec rit a4 1 fe c ADS Step 2 Insert an l 8024 block and an l 8090 block separately from the AO and Encoder block library 77 Simulink Library Browser zl x File Edit View Help D GE da rind I 8024 4channel 14 bit analog output module ENE CDMA Reference Blockset Communications Blockset Control System Toolbox H M DSP Blockset Dials amp Gauges Blockset kl Embedded Target for ICPDAS AI 1 Embedded Target for PDAS H AI DI DIO Step 3 Double click on the 8
34. nnection between Matlab TCP Client and LinCon TCP Server will be established Matlab LinCon User Manual July 2006 Ver 1 0 26 Matlab LinCon User Manual 18000 Series User Interface m E DIC Disconnect Connect to Ip i ie o 200 Port 10000 Set NET Message Connection rs established J Exit Haad Connection established Step 2 Click the Download button and select the file you want to download to the LinCon 8000 The download progress will show the percentage of completion After the execution file in PC is downloaded to the LinCon it will be saved with the fixed name matapp in the path mnt hda matlab Select File to Download Bp _ Look in E Demos amp t r5 9001 File name 9007 Files of type Cancel Matlab_LinCon User Manual July 2006 Ver 1 0 27 Matlab LinCon User Manual ELI Connect ip ise i o 28 Port 10000 Set NET Dor E Download 45 Connection established Step 3 If users want to execute the downloaded program just click the Start button In the meanwhile the message of Program is running will show up T8000 Series User Interface OTEPAP Disconnect Connect to Ip is ie o 200 lela Port 10000 Gat MET Message Exit l Step 4 After the p
35. ns refer to section 3 3 And then click Build button to start the build process Step 7 When the build process ends successfully download the control program generated to the LinCon 8000 and upload the experiment data for further analysis refer to section 3 4 Matlab LinCon User Manual July 2006 Ver 1 0 37 Matlab LinCon User Manual Step 8 If the stop time that you specified is up you can start the data uploading After the uploading process is completed use the built in MATLAB scripts to plot the result It would look like the figure below For Example plot tcpdata 1 tcpdata 2 Voltage V 0 8 0 6 0 4 0 2 Time s Matlab LinCon User Manual July 2006 Ver 1 0 38 Matlab LinCon User Manual 4 3 AO Modules This section attempts to make you familiar with the usage of the 1 8024 module which is a 4 channel and 14 bit analog output module In the beginning of this section we will give you a detailed introduction of the 8024 driver block And then a demonstration will be presented in the rest of this section Introduction to 1 8024 driver block On the dialog box of the l 8024 driver block you can select the outputs of the l 8024 module as either Voltage Out or Current Out If you select Voltage Out in the Output Mode field an output range between 10V and 10V will be available otherwise a current between 0 and 20 mA
36. nu to open the Simulation Parameters dialog box Then configure the RTW options refer to section 3 3 and press the Build button to start the build process Step 9 When the build process ends successfully download the exe file generated to the LinCon 8000 and run refer to section 3 4 Step 10 11 the stop time that you specified is up you can start the data uploading After the uploading process is completed use the built in MATLAB scripts to plot the result It would look like the figure below For Example plot tcpdata 1 tcpdata 2 Voltage V Time sec Matlab LinCon User Manual July 2006 Ver 1 0 44 Matlab LinCon User Manual 4 4 Relay Modules In the area of automatic control the relay component is frequently used as a voltage activated switch consisting of a bi directional switched connections and a switching input 8000 series module MATLAB Driver also provides the relay driver block to facilitate your design In the following subsection we demonstrate the usage of this block Introduction to Relay driver block Basically the relay modules provided by ICP DAS are categorized into two forms form A and form C The figure below shows the difference between them The relay of form A is represented by the 1 8064 and the relay of form C is represented by the 8060 No matter which form a relay is however the usage of the driver block is the same The individual input
37. oder options please follow these steps Step 1 On the Simulation Parameters dialog box click the Real Time Workshop tab and then click Stateflow options button simulation Parameters d001 act Solver Workspace 170 Diagnostics Advanced Real Time Workshop Category Target configuration Build Configuration System target file LinCon tlc Browse Template makefile inContmh 000059050000 Make command LinCon mE Generate cade only Stateflow aptior Step 2 When the Stateflow RTW Target Builder dialog box appears click the Coder Options button Matlab_LinCon User Manual July 2006 Ver 1 0 30 Matlab LinCon User Manual ELW Target Builder Target tty Real Time Workshop Parent machine 4002 Target Language ANSI C Real Time Workshop build Target Options Coder Options RT vy Builg settings far all libraries Description Document Link CO Cancel Help Apply Step 3 Check the two following options and then click OK button to apply the setting 1 Use chart names with no mangling 2 Use bitsets for storing state configuration Stateflow RTW Coder Options m led Target tw Real Time Workshop Coder Options Comments in generated code Preserve symbol names Append symbol names with parent names Lise chart names with no mangling Use bitsets far stor
38. ower Relay Output Module Library RELAY Dialog Box Block Parameters 1 8064 zx s Function mask Power relav module Parameters Relay Channel 101234567 Driver Block Parameters Relay Channel Enter numbers between 0 and 7 This block allows the selection of relay output lines in any order The number of elements defines the number of relay outputs used For example to use the first 8 relay outputs enter O 1 2 3 4 5 6 7 Slot The number of the slot where 1 8064 module is located For example choose 2 from the popup list if you have mounted an 1 8064 module on slot 2 Scaling Input to Output Block Input Value Hardware Output gt 0 Switch to NO lt 0 Switch to off Matlab_LinCon User Manual July 2006 Ver 1 0 78 Matlab LinCon User Manual l 8090 r4 m 2090 Function 3 axis Encoder Input Module Library Encoder Dialog Box Block Parameters 1 8090 s Function mask 3 axis encoder counter board Parameters Card NU Counting Mode Quadrant Anas I 1 1 1 Driver Block Parameters Card NO The number is not used for LinCon 8000 Counting Mode Quadrant CW CCW and pulse direction is available This setting depends on the wire connections of the l 8090 encoder module Axis The selected axis vector The default value is 1 1 1 Each of the elements in the vector is used to determine which axis is selected or not
39. p Matlab LinCon User Manual July 2006 Ver 1 0 11 Matlab LinCon User Manual Step 5 After the installation has been completed Please reboot your system to let the settings take effect Restarting Windows Setup has finished copying files to your computer Before you can use the program vou must restart Windows or your computer Choose one of the following options and click OF to finish setup Yes want to restart my computer now Reboot your system Step 6 After reboot C 7188 MATLAB default directory will be established automatically and the necessary files are placed in it Note 1 Users can also download the latest Matlab LinCon Driver for Matlab v6 5 from the web path http Awww icpdas com PAC lincon 8000 download htm Matlab_LinCon User Manual July 2006 Ver 1 0 12 Matlab LinCon User Manual 3 How to work with MATLAB Simulink This chapter gives an example to demonstrate how to construct your control model with Matlab LinCon driver blocks by using MATLAB Simulink In the meanwhile users will learn how to build the model into an executable file by employing RTW and RTW Embedded Coder In the last two sections of this chapter we will also show you how to cooperate the Stateflow Coder with Matlab LinCon driver blockset After you completely follow this chapter instruction it is expected that you can construct your own model and build it into an executable file and download it
40. port of the driver block expects a value greater than O to activate the corresponding physical relay output In other words if you assign a value 1 to the channel of the relay driver block the connection of the relay will be switched to NO On the dialog box of the relay driver block shown in the figure below you can select the channels which are used by entering a row vector in the field of Relay Channel And remember to choose the correct slot where the relay module is mounted Block Parameters 13050 Matlab LinCon User Manual Demonstration This demo uses 1 8060 relay module and an 1 8053 DI module to setup the experiment Channel 0 of the 8053 module is connected to a limit switch When channel 0 of the 8053 module is activated it will cause the channel 0 of the 8060 module switch to NO The following steps describe how this demo is created and implemented Step 1 Create a new model in Simulink and insert a SYS INIT block from the oystem block library Simulink Library Browser B xl File Edit View Help gt AA Find INIT Ininslize the HODI contol system li Control System Toolbox m g i DSP Blockset pastone arget for Motorola i a cae Step 2 Copy an l 8053 block and an l 8060 block separately from the DI and RELAY block library rm Library Browser Oj xj File Edit View Help Find 8060 Relay ou
41. ption 4 channel Isolated Analog Output Module Library AO Dialog Box Block Parameters 1 6024 X s Function mask 4 channel 14 bit analog output module Parameters Mode ME Output Channel B 123 Type of Value Floating Driver Block Parameters Output Mode Voltage Out or Current Out is available gt Voltage Output gt 10V gt Current Output gt 0 20 Output channel Enter numbers between 0 and 3 This block allows the selection of analog output lines in any order The number of elements defines the number of analog outputs used For example to use the first 4 analog outputs enter 0 1 2 3 Matlab_LinCon User Manual July 2006 Ver 1 0 59 Matlab LinCon User Manual Gain A multiplier The default value is 1 Slot The number of the slot where 1 8024 module is located For example choose 2 from the popup list if you have mounted an 1 8024 module on slot 2 Type of Value Floating or Hex is available The following table presents the difference between them Type of Value Block Input Data Range Hardware Output Floating 10 10 Voltage Out 10 10V Voltage Out 0 20 Current Out 0 20mA Current Out Hex 0 16383 Both 10 10V Voltage Out 0 20mA Current Out Matlab_LinCon User Manual July 2006 Ver 1 0 60 Matlab LinCon User Manual l 8040 5040 Description 32 channel Isola
42. ription 16 channel Isolated Digital Input Module single ended Library DI Dialog Box Block Parameters 1 8053 X s Function mask Tasolated digital input module tsngle ended Parameters Input channel 01234567 alot Driver Block Parameters Input channel Enter numbers between 0 and 15 This block allows the selection of individual digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter 01234596 7 Slot The number of the slot where 1 8053 module is located For example select 2 from the popup list if you have mounted l 8053 module on slot 2 Scaling Input to Output Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 67 Matlab LinCon User Manual 5054 Description 16 channel Isolated Digital 1 Module Library DIO Dialog Box Block Parameters 1 2054 X s Function mask Tsolated digital input amp output module Parameters DI Channel 101234567 Driver Block Parameters DI Channel Enter numbers between 0 7 This block allows the selection of digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter O 1 2 3 4 5 6 7 Slot The number of the slot where l 8054 module is located For example
43. rogram is executed successfully users can click the Stop button to stop the program After the program stopped users can click the Upload button to upload the data from LinCon 8000 The upload data will be saved in a file tcpdata mat It is fixed and it will be placed in the current working directory Matlab LinCon User Manual July 2006 Ver 1 0 28 Matlab LinCon User Manual E T BEES Connect to Ip i we 200 Pon 10000 Set NET Connection is established Step 5 To close the GUI communication interface users can click the Exit GUI button or on the right upper corner of GUI Matlab LinCon User Manual July 2006 Ver 1 0 29 Matlab LinCon User Manual 3 5 Working with Stateflow What is Stateflow otateflow is a graphical design and development tool for control and supervisory logic The advantage of Stateflow are as follows gt Visually model and simulate complex reactive systems based on finite state machine theory Design and develop deterministic supervisory control systems Easily modify your design evaluate the results and verify the system s behavior at any stage of your design To get more information about the Stateflow please visit the website http www mathworks com products stateflow How to work with Stateflow Here just explain the difference from the section 3 4 Other parts are all the same To configure the Stateflow C
44. s defines the number of digital inputs used For example to use the first 8 digital inputs enter 01234567 Slot The number of the slot where l 8051 module is mounted For example choose 2 from the popup list if you have mounted an l 8051 module on slot 2 Scaling Input to Output Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 65 Matlab LinCon User Manual l 8052 Je 1b 2h 3h Ak 5r Bb Th 5052 Description 8 channel Isolated Digital Input Module Differential input Library DI Dialog Box Block Parameters I s Function mask Taolated digital input module Differential mput Parameters Input channel 01234567 alot 8052 Driver Block Parameters Input channel Enter numbers between 0 and 7 This block allows the selection of individual digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter 01234567 Slot The number of the slot where l 8052 module is located For example select 2 from the popup list if you have mounted an 1 8052 module on slot 2 Scaling Input to Output Hardware Input Block Output Value Below 1V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 66 Matlab LinCon User Manual l 8053 h h o C yy 5053 Desc
45. solated Digital Output Module Library DIO Dialog Box Block Parameters 1 9042 Driver Block Parameters DI Channel Enter numbers between 0 and 15 This block allows the selection of digital input lines any order number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter O 1 2 3 4 5 6 7 Slot The number of the slot where l 8042 module is located For example choose 2 from the popup list if you have mounted an 1 8042 module on slot 2 Scaling Input to Output digital input Hardware Input Block Output Value Below 3 5V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 63 Matlab LinCon User Manual Scaling Input to Output digital output Block Input Value Hardware Output TT All channels are off is on and the others are off Ch1 is on and the others are off 65535 All channels are on Matlab LinCon User Manual July 2006 Ver 1 0 64 Matlab LinCon User Manual l 8051 5051 Description 16 channel Non isolated Digital Input Module Library DI Dialog Box Block Parameters L 8051 X s Function mask 6 channels non 1 0 1ated digital input module Parameters Input channel 01231 alot E Driver Block Parameters Input channel Enter numbers between 0 15 This block allows the selection of individual digital input lines in any order The number of element
46. t the beginning of this section Now we need to set the simulation parameters by choosing Simulation parameters from the Simulation menu Set the options as follows gt SOtoptime 20 gt Solver options Fixed step Fixed step size 0 005 Mode Single Tasking Here we set Solver options to Fixed step and Mode to Single Tasking The reason is that the RTW Embedded Coder does not support variable step time yet To compare the result of simulation with experiment fairly the setting Is suggested Matlab LinCon User Manual July 2006 Ver 1 0 17 Matlab LinCon User Manual simulation Parameters d001 sim Solver workspace 1 0 Diagnostics Advanced Real Time Workshop Simulation time Stark time 0 0 Stop time 20 Solver options Type Fised step Output options Click the OK button to set the options To start the simuloation of the model by clicking the Start simulation button on the toolbar of the model window Then the result of simulation can be watched by double clicking the scope block Press the Autoscale button in the Scope window and then it will show the appropriate scale Refer to the figure below c Jm BER Of 9 aja ts Matlab LinCon User Manual 3 2 Simulink model combines ICPDAS driver If the result of simulation is satisfied users need to replace the plant block with l 8000 modules driver blocks of ICPDAS To add l 8000 driver blocks
47. tchdog Timer Matlab_LinCon User Manual July 2006 Ver 1 0 4 Matlab LinCon User Manual Built in VGA PS 2 USB port Built in CF Card 128M bytes I O Expansion Slot O slot for L 8038 3 slot for L 8338 7 slot for L 8738 1 2 Features The MATLAB driver for LinCon 8000 embedded controller combines with MATLAB Simulink Stateflow perfectly and easily With the Matlab Simulink library Support many extended powerful blocks of the 1 8000 series modules including AO Al DO DIO DI and DataToFile function etc have been built in Therefore the sophisticated tasks of creating analyzing and simulating block diagram models all be solved with MATLAB Simulink Stateflow conveniently The features of Matlab LinCon are described as follows 1 Ethernet Communication Interfaces The Matlab LinCon solution provides the Ethernet Communication Interface to let users download their programs and upload the experimental data quickly and stably 2 Easy to use platform The Matlab LinCon solution provides a friendly communication GUI interface which enables users to communicate with LinCon 8000 target hardware conveniently 3 Reduce the design cycle of your product This Matlab LinCon solution combines LinCon 8000 with MATLAB Simulink Stateflow which provides users the model based control design approach and this approach is a timesaving and cost effective approach Therefore engineers can work with a single model of a function or
48. ted Digital Input Module Library DI Dialog Box Block Parameters 1 8040 X s Function mask 3z channels digital input module Parameters Input channel 01235671 alot E Driver Block Parameters Input channel Enter numbers between 0 and 31 This block allows the selection of individual digital input lines in any order The number of elements defines the number of digital inputs used For example to use the first 8 digital inputs enter 01234567 Slot The number of the slot where l 8040 module is mounted For example choose 2 from the popup list if you have mounted an l 8040 module on slot 2 Scaling Input to Output Hardware Input Block Output Value Below 3 5V 0 3 5V 30V 1 Matlab_LinCon User Manual July 2006 Ver 1 0 61 Matlab LinCon User Manual l 8041 Digital Output Slot 5041 Description 32 channel Isolated Digital Output Module Library DO Dialog Box Block Parameters 1 8041 Driver Block Parameters Slot The number of the slot where l 8041 module is located For example choose 2 from the popup list if you have mounted an 1 8041 module on slot 2 Scaling Input to Output CRO is on and the others are off Ch1 is on and the others are off 0 32 1 All channels on Matlab LinCon User Manual July 2006 Ver 1 0 62 Matlab LinCon User Manual 8042 Description 16 channel Isolated Digital Inout amp 16 channel I
49. ter LinCon IP address like 192 168 0 200 in the field IP 10000 in the field Port respectively Then click Connect to establish a connection with LinCon 8000 Step 3 When the connection was established successfully the grayed button Set NET is enabled Matlab_LinCon User Manual July 2006 Ver 1 0 80 Matlab LinCon User Manual 18000 Series User Interface TCP IP Connect to is ies o 200 Port 10000 Set NET Connection established Connection Is established Step 4 Click SetNET to open the setting window as shown in the figure below Enter intended ip mask gateway in the field IP MASK and GATEWAY respectively Then press SET to change the setting lox _ MATLAB File Edit View Web Window Help a d 4 b amp 6 18000 Series User Interface x Current Directory TCP IP D SMATLABOp5 work 11 Files Connect to test ip ie tee o 200 a Download Port 10000 vet NET test_MoFile tcpdata mat tcpdata txt 1 test exe In test mdl 1 test MoFile exe test NoFile mdl Connection is established 152 168 o 200 25 255 o o GATEWAY 192 168 o STATUS 254 C
50. the model window Simulink Library Browser File Edit View Help ninm E 24 Continuous S Discontinuities 33 Discrete 23 Look Up Tables T Math Operations Model Verification t Model Wide Utilities H Ports amp Subsvstems f Signal Attributes Signal Routing H 119 Dixontinii Dierre te Look Up Tables Math Operations tida Here we offer a simple PID controller model to you and show you how to create a model The completed block diagram of the model looks like the figure below Matlab_LinCon User Manual July 2006 Ver 1 0 14 Matlab LinCon User Manual a001_sim File Edit View Simulation Format Tools Help 06 cp chm ee aT eS 9001 sim mdl Integrstor Read 100 Adobe Acrobat Professional 8438 8838 User Manual pdf create this model you need to blocks to the model from the Simulink block libraries For example to copy a Step block to the model window follow these steps 1 First expands the Library Browser tree to display the blocks in the Sources library Do this by clicking the Sources node to display the Sources library blocks 2 Choose the Step block Then drag the Step block from the browser and drop it to the model Now the model window should look like the figure below JE Fie Edit View Simulation Format Tools Help 3
51. this demo we use all the channels so enter O 1 234 5 6 7 in the Channel field Then set voltage range as 10V and specify the slot where 801 module is mounted Finally set of Value to Floating Block Parameters I B017H s Function mask 14 bit 100 sampling rate 8 channel analog input module Parameters Channel 101234561 7 Voltage range 10 lot of Yalue Floating Step 3 In a similar manner open the DataToFile dialog box and the filename is fixed tcpdata mat Enter 1 in the Decimation field and then the Matlab LinCon User Manual July 2006 Ver 1 0 36 Matlab LinCon User Manual analog input signal will be recorded in every sampling time interval Block Parameters DataToFile amp Function mask Write time and input te specified file in row format Time ts in row 1 Parameters icp data mat Step 4 Copy one Mux block to the model window from the Simulink Signal Routing for MATLAB 6 5 Step 5 Connect all the blocks as shown in the figure below File Edit View simulation Format Tools Help ICFDAS 15555 Embedded Controller SYS IMIT ICFDAS DataToFile Block n 1 z 3 4 5 5 Fi DataToFile 2017H 100 T00 Step 6 Click Simulation parameters from the Simulation menu on the model window When the dialog box appears configure the RTW optio
52. to the LinCon 8000 target system for application Finally you can easily start your own project and upload the data for further analysis 3 1 Create a control model using Simulink To start Simulink you must first start MATLAB And then you can start Simulink by clicking the Simulink icon onthe MATLAB toolbar A MATLAB File Edit View Web Window Help Tg 5 sm Current Directory p MATLABEpStwork Gar i Stak Nass Bytes Class On Microsoft Windows platform starting Simulink displays the Simulink Library Browser window as shown below Simulink Library Browser File Edit View Help D GE al Continuous sinulinkMontinuous Continous SH Discontinuities 23 Discrete Zw Look Up Tables H Math Operations J Model Verification 3 Model Wide Utilities 23 Ports Subsystems PH Signal Attributes Signal Routing zT Sources User Defined Functions w Wh Aerospace Blockset _ ize Dies CDMA Reference Blockset z Communications Blockset Forts A be N Disc ontinuites F Hine Discrete Look Up Tables H Math Operations Ki Model Verification Wa Control System Toolbox om Dem Subsystems m 5 Lu Matlab LinCon User Manual Then click nj on the Library Browser s toolbar Windows only Simulink opens a new model window and then you can start to construct your own control model on the blank area of
53. tput module A CDMA Reference Blockset Communications Blockset Wb Control System Toolbox lb DSP Blockset Dials amp Ganges Blockset Embedded Target for ICFDAS Al AO 3 DI DIO DO m ce 0 8 9 Fixed Point Blockset Al ira e eee e ee 4 DO Matlab_LinCon User Manual July 2006 Ver 1 0 46 Matlab LinCon User Manual Step 3 Double click on the 8060 block to setup the relay module Here we use channel 0 of the 8060 module which is mounted on slot 1 of the l 8x38 embedded controller Block Parameters 1 5060 Step 4 Configure the 8053 block Please refer to the section 4 1 Step 5 Connect all blocks as shown in the figure below untitled x File Edit View Sanulation Format Tools Help Dig S eet f 5 66586 Embedded Controller 5 5 INIT Ready 100 oded5 2 Step 6 Click Simulation parameters from the Simulation menu to open the Simulation Parameters dialog box Then configure the RTW options refer to section 3 3 and press the Build button to start the build process Step 7 When the build process ends successfully download the exe file generated to the LinCon 8000 and run it refer to section 3 4 Matlab_LinCon User Manual July 2006 Ver 1 0 47 Matlab LinCon User Manual 4 5 Encoder Module In most applications of motion control encod
54. visit the website http www icpdas com products PAC lincon 8000 matlab lincon htm obtain the current driver situation and download the related documents and latest driver Module Model v 8040 8051 1 8052 1 8053 Digital input module 8058 DO Digital output module 8041 1 8056 1 8057 DIO Digital input amp output module 8042 1 8054 1 8055 8063 Analog input module Analog output module Encoder Encoder counter modue 8090 Matlab_LinCon User Manual July 2006 Ver 1 0 8 Matlab LinCon User Manual 2 Software Installation Before installing the MATLAB LinCon Driver users need to check 1 If Matlab v6 5 software development system installed in the operation system 2 The requirement toolbox of the MATLAB software for Matlab LinCon solution is listed as follows gt VV V WV MATLAB 6 5 is installed Simulink 5 0 installed Real Time Workshop 5 0 installed Real Time Workshop Embedded Coder 3 0 installed Stateflow and Stateflow Coder 5 0 it is optional if users needs the function Note that current solution is only tested in the Window system which is Win98 2000 XP In the following sections we will demonstrate the installation procedures step by step to make everything registered correctly 2 1 Driver Installation Step 1 7 m uw gt OQ Insert the LinCon 8000 CD and enter the Matlab LinCon Driver directory
55. will be instead Block Parameters 1 5024 lot 0 of Value Floating Furthermore the input type of the l 8024 driver block can be either Floating or Hex Matlab LinCon User Manual July 2006 Ver 1 0 39 Matlab LinCon User Manual Block Parameters 9024 E s Function mask 4 channel 14 bit analog output module Parameters Output Mode Voltage Ont Output Channel E 123 ram lot 10 Type of Value Floating Demonstration In this demo we use 1 channel of the 8024 module and 1 channel of the module Then channel 0 of l 8024 module is physically connected to channel 0 of I 8017H module After the physical wire connection is done send a sine wave to the input port of the 1 8024 driver block The following figures describe the steps by which this demo is created and implemented Step 1 Create a new model in Simulink and insert a SYS INIT block from the oystem block library 71 Simulink Library Browser P Ioj x File Edit View Help Ge A Find SYS INIT Itslize the HON erster Mi Control System Toolbox eM a i DSP Blockset HR arget for Motorola r a ll A a C JV Matlab_LinCon User Manual July 2006 Ver 1 0 40 Matlab LinCon User Manual Step 2 Copy the DataToFile block from the System block library to the model E Is Library Browser F

Download Pdf Manuals

image

Related Search

Related Contents

NEi Nastran Linear Tips and Tricks  C.A 5289 - PCE Instruments  Untitled  Manual de Instalación  ユーザー登録フォーム(PDFファイル版)はこちら    PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL  Polaris DVR Manual User Guide  POWER PLATE pro5 AIRdaptive™  Differo DF-32LRHDUG LED TV  

Copyright © All rights reserved.
Failed to retrieve file