Home

Advantech APAX-5522PE User Manual

image

Contents

1. Software APAX 5522PE Embedded Linux User Manual AD ANTECH Enabling an Intelligent Planet Copyright The documentation and the software included with this product are copyrighted 2012 by Advantech Co Ltd All rights are reserved Advantech Co Ltd reserves the right to make improvements in the products described in this manual at any time without notice No part of this manual may be reproduced copied translated or transmitted in any form or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reliable How ever Advantech Co Ltd assumes no responsibility for its use nor for any infringe ments of the rights of third parties which may result from its use About This Manual Thank you for using Advantech products This manual is a supplementation to APAX 5522 user manual and it emphasizes on Linux for APAX 5522 other detail informa tion about APAX 5522 hardware jumper setting serial port connection and so on please refer to the APAX 5522 Hardware manual Edition 1 October 2012 APAX 5071 Software Manual li Contents Chapter Chapter Chapter Chapter 1 k N oA 2 3 3 1 3 2 4 4 1 4 2 APAX 5522 features overview 1 Hardware 168165 eene eee enne eememereses essai eese e ens 2 Software features i
2. 3 2 3 Execute HelloWorld on the APAX 5522 1 Change HelloWorld file mode bit as 755 H chmod 777 HelloWorld 1 15 1 rwuxruxrux 8976 HelloWorld dEWXF XF X H bin dFUXFUXFUX dew drwxr xr x etc dEUXFWUXFUX home dEWXF XF X lib dFUXF XF X mnt dF XF XF X proc dEUXFWUXFUX sbin dr USP US F US tmp dFUXFUXFUX usr drwxzruxrwx Var H 2 Execute HelloWorld program on APAX 5522 tt HelloWorld Hello World 3 2 4 Sample Makefile of HelloWorld c The following example codes are the sample Makefile of HelloWorld c For example user can modify the Makefile on demand and put it on your host com puter and enter that folder in the host computer then execute make command The HelloWorld c will be built Execute make clean command will delete the HelloWorld program make clean APAX 5071 Software Manual 16 Makefile sample for HelloWorld program CC arm unknown linux guneabi gcc CFLAGS O BINS HelloWorld BINS c CC CFLAGS o lt clean rm f o BINS When compiling if message similar to cannot find xxx h files appears please make sure the file is under the search directory If not please add the file through I path Path means the path of the header file If undefined reference to XXX appears this means the library of this function may not be linked Please make sure the library file is under the search directory If not
3. Before 172 19 1 118 P Get Channel Information ADSDIO 11b version is 8x11 APAA anen SEA 8 1 2 i 4 6 f 2 3050 EUM 2 3000 5 8988 4 6088 7 2499 4 8688 6 2 W G U 7 5U 10 U 6728 mA W 5 U 18 U 4258 10 U Get Channel Information ADSDIO lib version is 686x181 2 028 i n AO AO AO AO AO AO Instruction apax_SetCntConfig Usage ped 2 30608 5 89668 B 8666 f 2499 SE 6 4752 872 5 U v al eee f 16 U 6726 np WL5U 18 U 426 m 10 U 4 2 9 Set CNT module configuration Function description Set the CNT module configuration of the indicated slot B8 8888 6 8881 0 9002 8 6886 4 6888 4 8668 4 8668 8882 Disable Disable Disable Disable Disable Disable Disable Disable B 86668 8661 8682 4 8666 2 5888 4 8068 4 8668 8662 2 30808 M 2 8 8 8 8 9 9090 SPEI 2 apax SetCntConfig slotID funcCode channellD paramO param1 39 APAX 5071 Software Manual Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 FuncCode 1 set Counting Start Stop 2 Reset counting 3 set Startup values 4 Clear status 5 Alarm config 6 Alarm latch clear Channel ID The channel ID starts from 0 If channel ID 255 which is apply to all channels ParmO funcCode 1 Start 1 Stop O funcCode 2 Not use funcCode 3 The startup value for the
4. 165 M EF i 8 5 q S ADSDIO library version is 102 Get 1 data DI 32 Data offset Get 6 data DI 32 Data offset 2621 ms DI 32 Data offset 2022 ms DI 32 Data offset 2023 ms DI 32 Data offset 4022 ms DI 32 Data offset 4023 ms DI 32 Data offset 4024 ms DI 32 Data offset 4025 ms DI 32 Data offset 4026 ms Get 1 data DI 32 Data offset 4520 ms Get 1 data DI 32 Data offset 45276 ms Total 27 data got within 5 sec fe EHD Hex f The APAX 5040PE has 24 DI channels If the DI 32 Data is 0x01 that means channel 0 is high level and the rest of channel 1 to 23 is low level APAX 5071 Software Manual 48 APAX 5000 I O module range code settings A 1 ADAM APAX NET Utility General Window These ranges are provided for reference Not all boards support all ranges Please see hardware manual for valid ranges for a particular board Millivolts DC mV Milliamps mA Counter settings Pt 100 3851 Pt 200 3851 Pt 500 3851 Pt 1000 3851 APAX 5071 Software Manual Setting Type 15mV 50mV 100mV 150mV 500mV 0 150mV 0 500mV 4 20mA 20MA 0 20mA Pulse DIR Up Down Up Frequency AB 1X AB 2X AB 4X Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 3851 3851 3851 3851 200 850 C 120 130 C 200 200 C 100 100 C 385
5. 2 Use arm unknown linux guneabi gcc command to compile HelloWorld c to HelloWord e adv adv desktop Documents File Edit View Terminal Help adv adv desktop Documents 15 1 total 8 rw r r 1 adv adv 76 2011 12 14 15 09 HelloWorld c rw r r 1 adv adv 179 2012 03 24 18 18 Makefile adv adv desktop Documents arm unknown linux gnueabi gcc HelloWorld c o HelloWorld adv adv desktop Documents ls l total 20 TWXF xr x 1 adv adv 8969 2012 03 24 18 19 Hello n rw r r 1 adv adv 76 2011 12 14 15 89 HelloWorld c fw r r 1 adv adv 179 2012 03 24 18 18 Makefile adv adv desktop Documents 3 2 2 Upload HelloWorld to the APAX 5522 1 Upload HelloWorld to APAX 5522 by using FTP Please refer to the above section 3 9 FTP service 2 Upload HelloWorld APAX 5522 by using USB storage device a List the partition tables This USB storage device node is dev sda1 172 19 1 105 PuTTY E Disk deu sda 258 HB 250609664 bytes 16 heads 32 sectors track 956 cylinders Units cylinders of 512 512 262144 bytes Device Boot start End Blacks Id System fdevfsdal 956 244720 b Win95 FRT32 H b Mount USB storage device A 172 19 1 105 PoTTT E mount devfsdal mnt t 15 mnt 8 15 APAX 5071 Software Manual c Copy HelloWorld to APAX 5522 deu etc home lib mnt proc sbin tmp usr cp mnt HelloUorld 15 HelloWorld dev mot shin bin etc proc tmp H
6. b 115200 Use serial port to send data at the Baud Rate of 115200 st dev ttyAPO s b 115200 Mount the CF card CF card is usually identified as hard disk the device is dev mmcbIkO and the user can use the mount command to mount the CF card to a folder For example it mount dev hda1 mnt The system now support ext2 ext3 and fat32 file system If your CF card s file sys tem is FAT32 you should mount it as follow mount t vfat dev hda1 mnt Mount the USB storage device Users also can mount the USB storage device to the APAX 5522 before they can access the USB storage device The steps are as follows List the partition tables for the specified devices and then exit fdisk USB storage device is usually identified as SCSI device the device is dev sda1 and the user can use the mount command to mount the USB device to a folder Mount USB Storage device it mount dev sdal mnt Unmount USB Storage device umount mnt Telnet service When you boot up the APAX 5522 the telnet service is already started by default The users can telnet to APAX 5522 by telnet client in another computer When you first telnet the APAX 5522 you should create a user and set password then you can use the user as username and the password you set as password Create user You may use the adduser command to create user account and password 9 APAX 5071 Software Manual 5172191108 adduser adu Changin
7. 1 2 False BOOL Disable Disable False Disable Disable 3 False BOOL Disable Disable False Disable Disable 4 2 10 Get the APAX 5017PE Al module with timestamp Instruction Function description apax_TimeStampAl Get the APAX 5017PE Al channel values with timestamp Usage apax_TimeStampaAl slotID param APAX 5071 Software Manual 44 Parameters Slot ID The slot ID which is ranged from O to 31 Param Polling interval sec default is 60 sec If param is 0 means infinite Result Show the Al channel value with timestamp Single Al Data Range code Channel index Time offset ms 4 2 10 1 Demo Online help 172192 108 PuTTY apax_TimeStampal DESCRIPTION Get the APAX S 17PE AI channel values with timestamp of the indicated slot The slot ID which is ranged from B to 15 Polling interval sec default is 66 sec If param 15 8 means infinite For example Get APAX 5017PE Al channel data within 1 second Slot id is 1 E apax_TimeStampAl 1 1 45 APAX 5071 Software Manual H apax_TimeStampaAl 1 1 L eee I EMILE Lg mp m t cl miri ADSDIO library version is 102 data c md T anh um nia L Get 1 data single AI Data 8 9837 1 U Channel Ho offset Get 1 data Single AI Data 8 8513 8 26 m Channel Ho 16 offset 118 ms Get 1 data single Al Data 16 3729 67268 mA Channel Ho 11 offset 193 ms Get 1 data Single AI Data 1
8. Set Alarm limit as 20 Set Alarm mapping channel as CNT channel 0 Set DO output behavior as high level E apax SetCntConfig 2 5 0 1 1 20 0 1 43 APAX 5071 Software Manual User can use the apax_GetChannellnfo command to check the result ZB 172 19 1 118 PuTTY Get Channel Information ADSDIO lib version is 82161 Type Ch Value Hode Alarm type Alarm limit Alarm flag Map Ch DO behavior False BOOL High 28 False Cnt High level 1 False BOOL Disable Disable False Disable Disable 2 False BOOL Disable Disable False Disable Disable 3 False BOOL Disable Disable False Disable Disable When the count value exceeds the limit the alarm will occur and the DO channel 0 will remain at high level until the alarm flag is cleared to 0 PuTTY 172 19 1 118 Get Channel Information ADSDIO lib version is 8181 Type Ch Value Mode Alarm type Alarm limit Alarm flag Hap Ch DO behavior 8 True BOOL High 20 True Cnt 0 High level 1 False BOOL Disable Disable False Disable Disable 2 False BOOL Disable Disable False Disable Disable 3 False BOOL Disable Disable False Disable Disable Clear channel 0 alarm flag apax_SetCntConfig 2 6 0 172191 118 PuTTY Get Channel Information ADSDIO lib version 15 1 Type Ch Value Mode Alarm type Alarm limit Alarm flag Map Ch DO behavior False BOOL High 28 False High level False BOOL Disable Disable False Disable Disable
9. please add the file through L path Path means the path of the library 17 APAX 5071 Software Manual APAX 5071 Software Manual 18 APAX utility tool kit for Linux The APAX utility tool kit provides eleven instructions that make it convenient for users to access the APAX 5000 I O modules They are located in the path bin Please see the description as following 4 1 Overview Instruction Function description apax_UtilityInfo apax_GetModuleList apax_GetModulelnfo apax_GetChannellnfo apax_SetChannelValue Display the utility version and support modules Discovery the APAX 5000 modules Get the APAX 5000 modules information Get the APAX 5000 modules channel information Set the APAX 5000 modules channel output Set the APAX 5000 modules channel range set the APAX 5000 DO modules configuration apax_SetChannelRange apax SetDoConfig apax SetAoConfig apax SetCntConfig apax_TimeStampAl Set the APAX 5000 AO modules configuration Set the APAX 5000 CNT modules configuration Get the APAX 5017PE AI module channel with timestamp Get the APAX 5040PE DI module channel with timestamp apax_TimeStampDI Note We recommend that when you use command apax GetChannellnfo which is periodically update function to show the APAX 5000 IO mod E ules channel information please use Putty or Pietty tool to connect to the APAX 5522 and set the window size of columns and rows as follows for a good display on channel in
10. 9 overruns 9 frame TK packets 9 errors 9 dropped 9 overruns carrier collisions txqueuelen 6 RM bytes 0 0 0 B TM bytes 0 0 0 B In addition we also provide a PC side client tool that users can use it to get the IP address of all the APAX 5522 devices Please plug the network cable to the LAN ethO port of the APAX 5522 devices 6 DAProjechAPAX 552X Linux SDK amp DOC SDEMiscWQuery 552X device IP inollAdyGelDevi Client broadcast Query APAX 552X Linux device IP Please wait few seconds Device B APAR_5522 IP address Device 1 APAR 5522 IP address 172 17 1 1868 172 19 1 185 APAX 5071 Software Manual 6 2 3 Configure IP Users can configure IP and change LAN physical address in etc rc OS then will execute the shell script automatically when booting up The default setting for Ether net is static IP address ifconfig lo 127 0 0 1 ifconfig ethO 10 0 0 1 netmask 255 255 255 0 ifconfig eth1 10 0 0 2 netmask 255 255 255 0 ip rule add from 10 0 0 1 lookup 10 ip route add table 10 default src 10 0 0 1 dev eth0 ip rule add from 10 0 0 2 lookup 11 ip route add table 11 default src 10 0 0 2 dev eth1 route add default gw 10 0 0 254 eth1 route add default gw 10 0 0 254 eth0 inetd amp cat etc motd If user wants to get the ethO IP by dhcp please mask and modify the etc rc file as follows ifconfig lo 127 0 0 1 if e var run dhcpcd ethO pid then rm f var run dhcpcd eth
11. version is 8x11 APAN anaa 35 1100 f 2 5 g ET Disable sm 5 i 8661 Disable Ag 2 8 7 9 2 3000 Disable AO 4 6668 6728 m 4 8668 Disable AO 8 8 as U 4 8668 Disable AO SEI 18 U 4 8668 Disable AO 4 8668 426 mA 4 000 Disable AO 2 7 9 p 2 Disable Set multi AO channels output Set channel 3 output as 5 89 mA Set channel 5 output as 7 25 volts Set channel 7 output as 6 475 volts The channel mask will be 10101000 0xA8 E apax SetChannelValue 5 4 4 0xA8 5 89 7 25 6 475 User can use the apax GetChannellnfo command to check the result 172 191 118 PuTTY Get Channel information ADSDIO lib version is Bx101 APAX 5028 55 2 1168 2 5 pM Disable do 0 90871 5 i pM Disable AO 2 3868 10 U 2 38868 Disable AO 5 8968 728 mA 4 8668 Disable Ag 4 8668 as U 4 8668 Disable AU f 2499 6716 U 4 8668 Disable AO Mu 28 4 8668 Disable AO p 4752 10 U pM Disable APAX 5071 Software Manual 32 4 2 6 4 2 6 1 Get DO channel info apax_GetChannellnfo 2 2 Set channel range Instruction Function description apax SetChannelRang Set the channel range of the indicated slot and channel e Usage apax SetChannelRange slotlD funcType channellD rangeCode Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 Func Type 1 set Al range code 2 set AO range code 3 set COUNTER range code Channel ID The channel ID starts
12. 000 C T C TypeR 500 1750 C T C TypeR 0 1768 C T C TypeS 500 1750 C T C TypeS 0 1768 C T C TypeB 500 1800 C T C TypeB 300 1820 C 3916 3916 3916 3916 3916 3916 0 100 C 3916 0 200 C 3916 0 400 C 3916 0 600 C 3916 200 850 C 120 130 C Nm NNN NN 7 lt xy N mm A OA 51 0x0280 0x0281 0x0282 0x0283 0x0284 0x0285 0x0286 0x0287 0x0288 0x02A0 0x02A1 0x02C0 0x02C1 0x02E0 0x02E1 0x02E2 0x0300 0x0320 0x0321 0x0340 0x0341 0x0360 0x0380 0x0381 0x0400 0x0401 0x0420 0x0421 0x0440 0x0441 0x0460 0x0461 0x0480 0x0481 0x04A0 0x04A1 0x04C0 0x04C1 APAX 5071 Software Manual AD ANTECH Enabling an Intelligent Planet www advantech com Please verify specifications before quoting This guide is intended for reference purposes only All product specifications are subject to change without notice No part of this publication may be reproduced in any form or by any means electronic photocopying recording or otherwise without prior written permis sion of the publisher All brand and product names are trademarks or registered trademarks of their respective companies Advantech Co Ltd 2012
13. 1 50 150 C 3851 0 100 C 3851 0 200 C 3851 0 400 C 3851 0 600 C Pt 200 3851 200 850 C Pt 200 3851 120 130 C Pt 500 3851 200 850 C Pt 500 3851 120 130 C _ _ r a i ma AZ OZ _rC A Pt 1000 3851 200 850 C Pt 1000 3851 120 130 C Pt 1000 3851 40 160 C 50 Value Hex 0x0100 0x0101 0x0102 0x0103 0x0104 0x0105 0x0106 0x0180 0x0181 0x0182 0x01C0 0x01C1 0x01C2 0x01C3 0x01C4 0x01C5 0x01C6 0x0200 0x0201 0x0202 0x0203 0x0204 0x0205 0x0206 0x0207 0x0208 0x0220 0x0221 0x0240 0x0241 0x0260 0x0261 0x0262 Pt 100 3916 Pt 200 3916 Pt 500 3916 Pt 1000 3916 Balco 500 Ni 518 Ni 508 Thermistor 3K Thermistor 10K T C Typed T C TypeK T C TypeT T C TypeE T C TypeR T C TypeS T C TypeB 200 850 C 120 130 C 200 200 C 100 100 C 50 150 C Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 100 Pt 200 Pt 200 3916 Pt 500 3916 200 850 C Pt 500 3916 120 130 C Pt 1000 3916 200 850 C Pt 1000 3916 120 130 C Pt 1000 3916 40 160 C Balcon 500 30 120 Ni 518 80 100 C Ni 518 0 100 C Ni 508 0 100 C Ni 508 50 200 C Thermistor 3K 0 100 C Thermistor 10K 0 100 C Thermistor 10K 50 100 C T C Typed 0 760 C T C Typed 200 1200 C T C TypeK 0 1370 C T C TypeK 270 1372 C T C TypeT 100 400 C T C TypeT 270 400 C T C TypeE 0 1000 C T C TypeE 270 1
14. 2 APAX 5522 embedded Linux configuration and usage 3 Basic Linux le 4 2 1 1 Is list the file information essere 4 2 1 2 cp CODY file or director sees 4 2 1 3 mv move or rename file directory i 4 2 1 4 rm delete file or directory 4 2 1 5 mkdir create directory esse 4 2 1 6 rmdir remove directory sss eee 4 2 1 7 pwd show the current path eee 4 2 1 8 chmod change file Mod Dit 9 2 1 9 execution of your program enn 5 2 1 10 ps report a snapshot of the current process 5 2 1 11 kill 9 PID kill the proCess ee 5 2 1 12 cd change directory ie 5 2 1 13 clear clear the Screen ee eee 5 2 1 14 reboot reboot the APAX 5522 i 5 Connecting the APAX 5522 LINUX nee 6 easdem C m J 7 Soi RTO M 8 ae ee ne a ee eee 9 MOUNTS CF e 9 Mount the USB storage device i 9 Telnet service criar 9 EET ne ER T E m 10 Development guide 13 Establish develop environment i 14 Quick start to develop application e 14 3
15. 2 1 Compile HelloWorld c eee ee 15 3 2 2 Upload HelloWorld to the 5522 eee 15 3 2 3 Execute HelloWorld on the APAX 5522 16 3 2 4 Sample Makefile of HelloWorld C esses 16 APAX utility tool kit for Linux 19 uaee iene EE E nate tecinaent 20 Command introduction 21 Display APAX utility information i 21 4 2 1 21 Get module 4 2 2 22 Get module 4 2 3 Get channel information i 24 4 2 4 Set Channel value a esnenenonnnnennnnnronrnrernrrnrornrrerrnrnrerrrrorrrrererrn 28 4 2 5 Set channel range i 33 4 2 6 Set DO module configuration eee 35 4 2 7 iii APAX 5071 Software Manual Appendix A A 1 4 2 8 Set AO module configuration i 37 4 2 9 Set CNT module configuration eee 39 4 2 10 Get the APAX 5017PE Al module with timestamp 44 4 2 11 Get the APAX 5040PE DI module with timestamp 47 APAX 5000 I O module range code zin ao EET ADAM APAX NET Utility General Window eese 50 APAX 5071 Software Manual IV APAX 5522 features overview 1 1 Hardware features CPU XScale PXA270 520 MHz Memory Flash 32M bytes SDRAM 64M bytes S Diagnostics LEDs 1xPower 1xRun 1xError 1xBattery 2xLAN link activity speed Real time Cloc
16. 5 53 DI DI DI DI DI DI DI DI DI DI 2 J 4 5 0 i 8 5 ml d False False False False False False False False False False False False BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL 25 APAX 5071 Software Manual Get DO channel info apax_GetChannellnfo 3 2 ADSDIO lib version is B8x1 1 APAS 5 045 si di DO DO DO DO DO DO DO DO DO DO k A H lt lt UN fe fo RI ok ok False False False False False False False False False False False False BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable Disable For example APAX 5017 12 CH Analog Input Module Get Al channel info apax GetChannellnfo 4 3 Get Channel Information ADSDIO lib version is 821M APAN ELE 37 APAX 5071 Software Manual Hormal Hormal Burn out Hormal Hormal Hormal Hormal Hormal Hormal Hormal Burn out Hormal 26 For example APAX 5028 8 CH Analog Output Module Get AO channel info apax_GetChannellnfo 5 4 P172 19 1 118 PulTY Get Channel Information ADSDIO lib version is Bx101 APAA 5 828 55 g TIE f 2 5 B T Disable ii 6 6681 7 5 i 6 6681 Disable AG 2 3068 10 U 2 3668 Disable AO 8 8 626 mh 8 8 Disable AG 4 8668 as U 4 8
17. 668 Disable AG 4 6668 6168 U 8 8 Disable AO 4 0888 4209 m 5 0888 Disable AG H 6682 10 U 6 6682 Disable For example APAX 5080 4 8 CH High Speed Counter Module Get DI channel info apax_GetChannellnfo 2 1 Get Sra E rare z TN ADSDIO lib version is 82181 52 Type Ch Value Mode DI 8 False BOOL 1 False BOOL 2 False BOOL d False BOOL Get DO channel info apax_GetChannellnfo 2 2 Get Channel TII ADSDIO lib version is Bx101 52 5888 Type Ch Value Mode Alarm type Alarm limit Alarm flag Map Ch 8 False BOOL High u False Cnt False BOOL High 18 False Cnt High leuel False BOOL Disable Disable False Disable Disable False BOOL Disable Disable False Disable Disable PulseHi 5000 27 APAX 5071 Software Manual Get CNT channel info apax_GetChannellnfo 2 5 172 19 1 118 PuTTY Get Channel Information ADSDIO lib version is 1 Type Ch Value Mode startup Counting Status CHT Up and Down mode stop Hormal CHT Up and Down mode stop Hormal CHT Up mode stop Hormal CHT Frequency mode stop Hormal CHT ABIS mode stop Hormal CHT ABIX mode stop Hormal CHT Up mode stop Hormal CHT Frequency mode stop Hormal UNI So i S amp amp io G i Ci G amp amp amp 4 2 5 Set channel value Instruction Function description apax_SetChannelValue Set the module output value of the indicated slot APAX 5071 Software Man
18. 8 AI B 8882 Normal 18 AI 9 0992 Normal 18 AI B 8882 Normal 18 AI 9 0992 Normal 18 AI AI AI AI AI 6 2 Hormal 10 6 8882 Hormal f 18H 2 Hormal 18H 6 8682 Hormal f 18H 6 8882 Hormal f 18H G C G G C C P d 4 AI 6 0 2 Hormal 16 H 8 9 1 1 4 2 7 Set DO module configuration Instruction Function description apax_SetDoConfig Set the DO module configuration of the indicated slot Usage apax SetDoConfig slotID funcCode paramO param1 35 APAX 5071 Software Manual Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 FuncCode 1 set Safety function 2 set Safety values ParmO funcCode 1 Enable 1 Disable 0 funcCode 2 The safety values from channel 0 to 31 to be set The LSB indicates the channel O Param1 funcCode 1 Not use funcCode 2 The safety values from channel 32 to 63 to be set The LSB indicates the channel 32 Result Show set DO configuration done or failed message 4 2 7 1 Demo Set DO configuration Online help PuTTY 172 19 1 118 apax_SetDoConfig DESCRIPTION Set the DO module configuration of the indicated slot USAGE PARAMETER The slot ID which is ranged from B to 31 set Safety function Set Safety values 1 2 FuncCode 1 Enable 1 f Disable 8 funcCode 2 The safety values from channel 8 to 31 to be se
19. 8 6066 18 U Channel Ho 8 offset 277 ms Get 1 data Single AI Data 8 64849 5 U Channel Ho 5 offset 694 ms Get 1 data Single Al Data 8 8266 5 U Channel Ho 6 offset fff ms Get 1 data Single AI Data 5 8888 5 U Channel Ho 7 offset 881 ms Get 1 data Single Al Data 12 0338 4 28 m Channel Ho 8 offset 944 ms Total 12 data got within 1 sec fH EHD HEX APAX 5071 Software Manual 46 4 2 11 Get the APAX 5040PE DI module with timestamp Instruction Function description apax_TimeStampDI Get the APAX 5040PE DI channel values with timestamp Usage apax_TimeStampDI slotID param m Parameters Slot ID The slot ID which is ranged from 0 to 31 Param Polling interval sec default is 60 sec If param is 0 means infinite Result Show the DI channel values with timestamp DI Hex Data 32 bits The LSB is channel 0 MSB is channel 31 Time offset ms 4 2 11 1 Demo Online help PuTIY 172 19 2 108 apax TimeStampDI DESCRIPTION Get the APAX 5646PE DI channel values with timestamp of the indicated slot USAGE PARAHETE The slot ID which is ranged from 8 to 1 Polling interval sec default is 6H sec If param is 8 means infinite For example Get APAX 5040PE DI channel data within 5 second Slot id is 0 apax_TimeStampDI 0 5 47 APAX 5071 Software Manual g172 19 2 11 NS apax_TimeSta
20. O pid fi if e var run dhcpcd eth1 pid then rm f var run dhcpcd eth1 pid fi dhcpcd ethO amp dhcpcd eth1 amp inetd amp cat etc motd Sometimes you may need to modify the IP routing table by manually that can route to the correct LAN port out Please refer to the following case and manually modify the rules of the IP routing table when the system startup The red color words depend on the routing table You can type route instruction to know the current setting route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use lface 10 0 0 0 255 255 255 0 U 0 0 0 eth0 10 0 0 0 255 255 255 0 U 0 0 0 eth1 default 10 0 0 254 0 0 0 0 UG 0 0 0 0 default 10 0 0 254 0 0 0 0 UG O 0 0 eth1 For example just use LAN2 case therefore need to remove the routing rules of the LANI1 eth0 from the routing table Type following instructions route del net 10 0 0 0 netmask 255 255 255 0 dev eth0 route del default gw 10 0 0 254 eth0 7 APAX 5071 Software Manual 2 4 Now can route to the correct LAN port out route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10 0 0 0 255 255 255 0 U 0 0 0 eth1 default 10 0 0 254 0 0 0 0 UG O 0 0 eth1 P routing table rules System startup Typing the Linux instructions Just use LAN1 eth0 route del net 10 0 0 0 netmask 255 255 255 0 dev eth1 route del default gw 10 0 0 254 eth1 Note I
21. ange param2 AO module The next channel value specified by channel range paramX AO module The next channel value specified by channel range a Result Show set channel output done or failed message 4 2 5 1 Demo Set DO AO channel output Online help 172 19 1 118 PuTTY apax_SetChannelValue DESCRIPTION Set the module output value of the indicated slot USAGE Set single channel value Set multi channel values PARAMETER slot ID which is ranged from 6 to 31 set single DO value set multi DO values set single AO value set multi AO values channel ID starts from 8 The channel value of the indicated channel The total of the parameter count if datalen 15 3 followed by 3 data param parami param3 DO module AO module module module module module The DO values from channel 8 to 31 to be set The LSB indicates the channel 8 The channels mask From LSB to MSB of the value indicate If the bit is 1 it means that the channel must change value the DO values from channel 32 to 63 to be set The LSB indicates the channel 32 the channel value specified by channel mask the next channel value specified by channel mask the next channel value specified by channel mask For example APAX 5045 24 CH Digital Input Output Module Set single DO channel output set channel 0 as HIGH apax SetChannelValue 3 1 0 1 User can use the apax GetChannellnfo command to
22. check the result APAX 5071 Software Manual 30 g 172 19 1 118 PoTTT Get Channel Information ADSDIO lib version is Bx181 Type Ch Ualue Hode Safety value DO True BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable DO False BOOL Disable nl SSO UN fe ON a P Set multi DO channels output Set channel 8 to 11 as HIGH The DO values will be 111100000000 0xf00 apax_SetChannelValue 3 2 1 Oxf00 User can use the apax GetChannellnfo command to check the result ge 172 19 1 118 PuTTY Get Channel Information ADSDIO lib version is 871 Type Ch Value Mode Safety value DO False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable True BOOL Disable True BOOL Disable True BOOL Disable True BOOL Disable DO DO DO DO DO DO DO DO DO DO DO 1 3 d m 6 H 8 U 4 For example APAX 5028 8 CH Analog Output Module Set single AO channel output set channel 0 output as 2 11 volts apax_SetChannelValue 5 3 0 2 11 31 APAX 5071 Software Manual User can use the apax_GetChannellnfo command to check the result E 1472 19 1 118 Pu uTIY Get Channel Information ADSDIO lib
23. f you reinsert the network cable to LAN2 please type the following commands to create the LANT routing table rules route add net 10 0 0 0 netmask 255 255 255 0 dev eth1 route add default gw 10 0 0 254 eth1 Just use LAN eth1 route del net 10 0 0 0 netmask 255 255 255 0 dev ethO route del default gw 10 0 0 254 eth0 Note If you reinsert the network cable to LAN1 please type the following commands to create the LANT routing table rules route add net 10 0 0 0 netmask 255 255 255 0 dev ethO route add default gw 10 0 0 254 ethO Both use LAN1 amp LAN2 No need to modify Configure RTC You may use the date command to print or set the system date SYNOPSIS date MMDDhhmmYYY Y SS MM Month DD Date hhmm hour and minute YYYY Year SS second For example Fri Apr 03 18 54 12 UTC 2009 date 040318542009 12 Fri Apr 3 15 54 12 UTC 2009 In order to maintain the correct time when powering off users should use the hwcolck to write the current time to real time clock hwclock systohc Now if you reboot the APAX 5522 the time is still correct APAX 5071 Software Manual 8 2 9 2 6 2 7 2 8 Serial port APAX 5522 has two serial ports the device node is dev ttyAPO and dev ttyAP1 For serial port test APAX 5522 has built in test program called st serialtest for user test serial port functionality Please see below example Use serial port to receive data at the Baud Rate of 115200 st dev ttyAPO r
24. for TestApp 89709 bytes 226 Transfer complete ftp 89770 bytes received in H HBH5Seconds 8770000 bB9Kbytese sec Ftp m Basic FTP command I exit FTP back to pc temporarily bin transfer files in Binary mode ascii transfer files in ASCII mode get download file from APAX 5522 put upload file from PC to APAX 5522 bye exit FTP 11 APAX 5071 Software Manual APAX 5071 Software Manual 12 Chapter 3 Development guide 3 1 Establish develop environment To install cross compile tool you should have the Linux distribution pre installed in your host computer for example Ubuntu Linux distribution Then put the cross com pile tool arm unknown linux gnueabi 4 2 2 tar bz2 to the folder and use root per mission to execute the following command to install it tar jxvf arm unknown linux gnueabi 4 2 2 tar bz2 After the installation the development environment will be established You may execute arm unknown linux gnueabi gcc v to check the development environment is successfully installed if you can see a similar message as below e adv adv desktop File Edit View Terminal Help adv adv desktop arm unknown linux gnueabi gcc v Using built in specs arget arm unknown linux gnueabi Configured with tmp crosstool ng targets src gcc 4 2 2 configure build i686 build pc linux gnu host i686 build pc linux gnu target arm unknown linux gnueabi prefix usr local with
25. formation updating i PuTTY Configuration E X Category El Session lt lt Logging l Terminal i Keyboard E 7 H Appearance Behaviour Translation Selection Colours l Connection About Get the size of the window Columns pos When window is resized f Change the number of rows and columns C Change the size of the font C Change font size only when maximised Forbid resizing completely Control the scrollback in the window Lines of scrallback 00 I Display scrollbar Display scrollbar in full screen mode Reset scrollback on keypress Iv Reset scrollback on display activity Iv Push erased text into scrollback PuTTY download page http www chiark greenend org uk sgtatham putty download html APAX 5071 Software Manual 20 PieT TY download page http ntu csie org piaip pietty 4 2 Command introduction This section includes important information for users to use APAX utility tool kit Please refer to the parameters of each command in order to correctly use 4 2 1 Display APAX utility information Instruction Function description apax_UtilityInfo Display the utility version and support modules Usage apax_UtilityInfo Parameters None Result Display the utility version and support modules 4 2 1 1 Demo cf 172 19 1 118 PuTTY apax_UtilityInfo L JL Uersion 188 ADSDIO library version 182 Support Hodu
26. from 0 If channel ID 255 which is apply to all channels range Range Code The range code is defined by the module Please refer to the online help or section of appendix A Result Show set channel range done or failed message Demo Set Al AO CNT channel range Online help Pat TS 172 19 1 118 apax_SetChannelRange DESCRIPTION Set the module range of the indicated slot and channel The slot ID which is ranged from 8 to 31 Set AI range code Set AU range code Set COUNTER range code nou The channel ID starts from 8 If channel ID 255 which is apply to all channels range The range code is defined by the module dim LIUM 3851 2007850 C Ox 62 For example APAX 5017 12 CH Analog Input Module Set Al channel range set channel 0 range code as 0x0181 20 mA apax_SetChannelRange 4 1 0 0x0181 33 APAX 5071 Software Manual User can use the apax_GetChannellnfo command to check the result i B uq Bo GB aee Cc jJ pu 11 _ LIE LE 1 F EH T E LI 2 D ne ADSDIO lib version is Bx101 34 5817 Type Ch Value 1 8 8 9809 P 28 8808 4 8666 6 8825 B 1 B 96069 p PE 8 B 1 2 8 P Hormal Hormal Burn out Hormal Hormal Hormal Hormal Hormal Hormal Hormal Burn out Hormal 74 22 p h For example APAX 5028 8 CH Analog Output Module Set AO channel range set channel 0 range code a
27. g password for adu Enter the new password minimum of 5 maximum of 8 characters Please use a combination of upper and lower case letters and numbers Enter new password Re enter new password Password changed H After setting you can telnet to APAX 5522 by new user account Linux 2 6 25 8 rt 172 19 1 67 ttuypB login adu Password it Remove user Use root id login to APAX 5522 The steps are as follows 1 Delete user deluser adv 2 Remove user home directory rm home adv 2 9 FTP service When you boot up the APAX 5522 the ftp service is already started by default The user can use the ftp client to connect APAX 5522 then download files from APAX 5522 or upload files to APAX 5522 through network Example Upload file to APAX 5522 Gi ftp gt ftp 172 19 1 108 Connected to 172 19 1 108 22H CusFIPd 2 3 45 User 1 72 19 1 168 2 none gt gt ady 331 Please specify the password Password 2386 Login successful iftp gt bin 2699 Switching to Binary mode ftp put HelloWorld 268 PORT command successful Consider using PASU 158 Ok to send data 226 Transfer complete ftp 8974 bytes sent in H HHSeconds 8776004 66Kbytes sec ftp gt m APAX 5071 Software Manual 10 S Download file from APAX 5522 cy C AWINDO WS system32wmd exe ftp 172 19 1 108 ftp get TestApp 200 PORT command successful Consider using PASU 158 Opening BINARY mode data connection
28. h ID Description Firmware Channel Type APAX 5071 Software Manual 22 4 2 3 1 Demo Get the module information Online help PuTTY 172 19 1 118 apax GetModuleInfo DESCRIPTION Get the module information of the indicated slot USAGE PARAMETER The slot ID which is ranged from B to 31 SlotID 255 means display all Get the one module information 172 19 1 118 PuTTY apax GetHModuleInfo 3 ADSDIO library version is 1 Get Module Information Switch ID 3 Description 24 CH Digital Input Output Module Firmware 8 Channel Type 12 DI channels 12 DO channels 1t Get all found the module information SlotlD 255 23 APAX 5071 Software Manual Fal 172 19 a A P 1 r it anan pet Hod uleInfo 255 ADSDIO library version is 1 Get Module Information APAX 5 868 Switch ID Description Firmware Channel Type APAX 5 09 91 Switch ID Description Firmware Channel Type APAX 5O45 Switch ID Description Firmware Channel Type APAX 5017 switch ID Description Firmware AD Version Channel Type APAX 5 928 Switch ID Description Firmware Channel Type H 12 CH Relay Output Module 8 12 DO channels ict 4 8 CH High Speed Counter Module 8 2 4 DI channels 4 DO channels 8 Counter channels 3 24 CH Digital Input Output 8 J ai 12 DI channels 12 DO channels DH 12 CH Analog Input Module 5 31 12 AI channels 5 8 CH Anal
29. indicated channel funcCode 4 Not use funcCode 5 Alarm mode Enable 1 Disable 0 funcCode 6 Not use Param1 funcCode 5 Alarm type High alarm 1 Low alarm 0 Param2 funcCode 5 Limit value The counter limit which will fire the alarm Params funcCode 5 MapChannel The counter channel that the alarm mapped to Param4 funcCode 5 DO output mode 0 Low level 1 High level 2 Low pulse 3 High pulse Param5 funcCode 5 DO pulse width milliseconds Result Show set CNT configuration done or failed message 4 2 9 1 Demo Set CNT configuration Online help APAX 5071 Software Manual 40 pax SetCntel slotID The slot ID which is ranged from 8 to 31 FuncCode 1 set Counting Start Stop 2 Reset counting 3 set Startup values 4 Clear status 5 Alarm config 6 Alarm latch clear channelID The channel ID starts from 8 If channel ID 255 which is apply to all channels param FuncCode start 1 Stop FuncCode Hot use FuncCode The startup value for the indicated channel FuncCode Hot use funcCode Alarm mode Enable 1 Disable 6 FuncCode Hot use parami FuncCode Alarm type High alarm 1 Z Low alarm 6 param FuncCode Limit value The counter limit which will fire the alarm Dar and FuncCode HapChannel The counter channel that the alarm mapped to param FuncCode DO output mode 8 Low level 1 High level 2 Low pulse 3 High pulse params funcCode DO pulse wid
30. k Yes Watchdog Timer Yes Power Consumption 5 W 24 VDC typical USB Ports 1 USB 1 1 LAN Ports 2 10 100 Mbps Serial Ports 2 RS 232 Serial Baud Rate 9600 115200 bps Storage 1 x Type Il Compact Flash card slot internal 1 2 Software features Boot loader U boot 1 1 6 Kernel version Linux 2 6 25 8 rt7 Clibrary glibc version 8 OS boot up time lt 40 seconds Flash partition Boot loader 512k Kernel 2 3M Root file system 25 8 M Root files system JFFS2 APAX 5071 Software Manual 2 APAX 5522 embedded Linux configuration and usage 2 1 2 1 1 2 1 2 2 1 3 2 1 4 2 1 5 2 1 6 2 1 7 Basic Linux command Is list the file information Example Is l list detailed information of file ls a list all files including hidden files Is 1 list the files that are arranged by time cp copy file or directory Example cp test c home user copy test c file to home user cp a mywork home user copy mywork directory to home user mv move or rename file directory Example mv test c main c rename file test c to main c mv workspace backup rename directory workspace as backup rm delete file or directory Example rm test c delete file test c rm r workspace delete directory workspace mkdir create directory Example mkdir workspace create workspace directory rmdir remove di
31. les 3 8 EH RID module APAN 12 CH Analog Input Module AFAN 12 CH High Speed Analog Input Module APAN TEC 61850 3 Certified 12 ch Analog Input Module APAN 12 CH Thermocouple Hodule APAS 8 CH Analog Output Module APAX 24 CH Digital Input Module IEC 61858 3 Certified 24 CH Digital Input Module APAN 24 CH Digital Input Output Module APAN 24 CH Digital Output Hodule 12 CH Relay Output Hodule AFAN TEC 61850 3 Certified 12 CH Relay Output Module APAN 4Z8 CH High Speed Counter Module H 4 2 2 Get module list Instruction Function description apax_GetModuleList Discovery the APAX 5000 modules Usage apax_GetModuleList 21 APAX 5071 Software Manual Parameters None Result Found that the APAX 5000 module name and slot ID APAX PAC Module Name Slot ID 4 2 2 1 Demo Discovery the APAX 5000 modules 172 19 1 118 PuTTY apax GetModuleList ADSDIO library version is 101 Waiting refresh IU modules APAX PAC 5868 51 5888 52 53 54 5 4 2 3 Get module information Instruction Function description apax GetModulelnfo Get the module information of the indicated slot Usage apax GetModulelnfo SlotlD Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 Slot ID 255 show all found the APAX 5000 modules Result Found that the APAX 5000 module name and slot ID Module Name Switc
32. n use Telnet to connect to the APAX 5522 s console if you have known the IP address Once you connect to the APAX 5522 you can proceed to configure network settings as described in the next section Telnet can be used locally by using a crossover Ethernet cable to connect your computer to the APAX 5522 or over a LAN or the Internet The default IP address and netmask are shown below To login type the Login name and password as requested The default login name is root and no pass Word Default IP Address Default netmask LANT eth0 10 0 0 1 255 255 255 0 LAN2 eth1 10 0 0 2 255 255 255 0 ifconfig eth Link encap Ethernet HWaddr 00 D0 C9 F8 49 91 inet addr 10 0 0 1 Bcast 10 0 0 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAST HTU 1500 Metric 1 RK packets 1139 errors 9 dropped 9 overruns 9 frame TK packets 9 errors 9 dropped 9 overruns 9 carrier collisions txqueuelen 1900 RM bytes 132363 129 2 KiB TM bytes 0 0 0 B Interrupt 15 Base address 9xc900 Link encap Ethernet HWaddr 00 D0 C9 F8 49 92 inet addr 10 0 0 2 Bcast 10 0 0 255 Mask 255 255 255 0 UP BROADCAST MULTICAST MTU 1580 Metric 1 RX packets errors dropped overruns 0 frame 0 TK packets 9 errors 9 dropped overruns carrier collisions txqueuelen 1900 RM bytes 0 0 0 B TK bytes 0 0 0 B Interrupt 158 Link encap Local Loopback inet addr 127 0 0 1 Mask 255 9 09 09 UP LOOPBACK RUNNING MTU 16436 Metric 1 RK packets errors 9 dropped
33. nfig slotID funcCode paramO param1 37 APAX 5071 Software Manual Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 FuncCode 1 set Safety function 2 set Safety values 3 set Startup values ParmO funcCode 1 Enable 1 Disable 0 funcCode 2 3 param0 is channel ID The channel ID start from 0 Param1 If channel ID 2 255 which is apply to all channels value funcCode 1 Not use funcCode 2 The value for the indicated channel Result Show set AO configuration done or failed message 4 2 8 1 Demo Set AO configuration Online help pat TY 172 19 1 118 H apax_SetAoConfig DESCRIPTION Set the AO module configuration of the indicated slot slot ID which is ranged from 8 to 31 funcCode funcCode FuncCode FuncCode set Safety Function set Safety values Set Startup values Enable 1 Disable 8 2 3 param is channel ID The channel ID start from 8 If channel ID 255 which is apply to all channels value Mot use 2 3 The value for the indicated channel For example APAX 5028 8 CH Analog Output Module Set safety function enable apax_SetAoConfig 5 1 1 Set Channel 0 safety value as 2 3 volts apax_SetAoConfig 5 2 0 2 30 Set channel 4 startup value as 2 5 volts E apax SetAoConfig 5 3 4 2 5 APAX 5071 Software Manual User can use the apax_GetChannellnfo command to check the result
34. og Output Module 8 8 AD channels 4 2 4 Get channel information Instruction apax GetChannellnfo Function description Periodically update the channel information of the indicated slot ID and channel type Usage apax GetChannellnfo slotID channelType p msec n m Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 Channel type 1 DI 2 DO 3 Al 4 AO 5 COUNTER option p Polling interval msec default is no delay n No polling Get data once Result for example AI module Module Name Slot ID APAX 5071 Software Manual 24 Note Channel Type Channel Press Esc key to exit the program Channel ID value Channel Range Channel status 4 2 4 1 Demo Get DI DO AI AO CNT channel values Online help li L h Ra RE NL in E m YT rA TOT 118 Puii p LALL LLT RB ru EP IV tpt apax_ GetChannelInfo DESCRIPTION USAGE Get the channel information of the indicated slot ID and channel type PARAMETER SlotID The slot ID which is ranged from B to 31 channelType 2 d m 5 option p Sa COUNTER Polling interval msec Ho Polling Get data once default is no delay For example APAX 5045 24 CH Digital Input Output Module Get DI channel info apax_GetChannellnfo 3 1 4 E La A n allit Get Channel Information ADSDIO lib version is 21 APAX 504
35. rectory Example rmdir workspace remove workspace directory pwd show the current path Example pwd nome user APAX 5071 Software Manual 4 2 1 8 chmod change file mod bit Example chmod 754 test Is test rwxr xr 1 adv adv 8004 Jan 1 1970 test A combination of the letters controls which user can access to the file 754 means 111 read write execute 101 read write execute 100 read write execute The first number 7 is owner can read and write and execute file The second number 5 is group can only read and execute file The third number 4 is all users can only read file 2 1 9 execution of your program Example Is l test rwxr xr 1 adv adv 8004 Jan 1 1970 test test This is my test program 2 1 10 ps report a snapshot of the current process PID Uid VmSize Stat Command 1 root 544 S init 5 2 root SW lt kthreadd 3 root SW lt ksoftirqd 0 4 root SW lt watchdog 0 5 root SW lt events 0 6 root SW lt khelper 1309 root 904S sh 1571 root 896 S sh 1593 root 320HR test 1594 root 728R ps 2 1 11 kill 9 PID kill the process Example kill 9 1593 kill the running test program the PID is 1593 2 1 12 cd change directory 2 1 13 clear clear the screen 2 1 14 reboot reboot the APAX 5522 5 APAX 5071 Software Manual 2 2 Connecting the APAX 5522 Linux Users can check the RUN LED lights when the APAX 5522 is powered on Then ca
36. rflow 8 Up Hormal 8 Frequency Hormal RB15 Hormal RB15 Hormal 8 Up Hormal 8 Up Hormal 4 2 3 4 L 6 APAX 5071 Software Manual 42 After ADSDIO lib version is 82181 APAX 5 B8B T 4294967247 Up and Doun Start Hormal cir CHT CHT CHT CHT CHT CHT 4294967247 Up and Down Start Normal Up Start Hormal Frequency start Hormal 8 ABTS Start Normal 8 ABITA Start Hormal 8 Up Start Hormal 8 Up Start Hormal Ce MU E Go I ll The APAX 5028 DO channel can be configured as an alarm channel When the count value exceeds the limit the alarm will occur SetDO channel 0 as an alarm channel You can us below command to enable alarm mode apax SetCntConfig 2 5 1 User can use the apax GetChannellnfo command to check the result Before ADSDIO lib version is 71 52 5888 Type ch Value Mode Alarm type Alarm linit Alarm Flag 0 behavior DO Disable Disable Disable Disable don Disable Disable i Disable Disable False BOOL Disable Disable False Disable Disable False BOOL Disable Disable False Disable Disable ADSDIO 1ib version 15 71 52 5888 Gisele enaiHar True Low False Ent 0 Low level False Disable oa False Disable Disable 1 False BOOL Disable Disable False Disable Disable 2 False BOOL Disable Disable False Disable Disable 3 set the channel 0 alarm configuration Set Alarm type as High trigger
37. s 0x0146 0 2 5 V apax_SetChannelRange 5 2 0 0x0146 User can use the apax_GetChannellnfo command to check the result ADSDIO lib version is 62181 APAX 5028 35 AO AO AO AO AO AO AO 2 9858 gU PEE 2 3088 8 H BERO f 2499 BBBB 4752 gv 5 U 1 5 U 18 U 20 m W5Uu 18 U 429 m 18 U 1 2568 gU PEL 2 3068 H H BBBB 4 BBBB B 65982 Disable Disable Disable Disable Disable Disable Disable Disable For example APAX 5028 4 8 CH High Speed Counter Module Set CNT channel range set channel 7 range code as 0x01c2 Up mode apax_SetChannelRange 2 3 7 2 APAX 5071 Software Manual 34 User can use the apax_GetChannellnfo command to check the result Z 172 191 118 PuTTY Get Channel Information ADSDIO lib version is 1 52 5888 car CHT CHT CHT CHT CHT CHT Hormal Hormal Hormal Hormal Hormal Hormal Hormal Hormal Up and Down Up and Down Up Frequency ABIX RB15 up up For example APAX 5017 12 CH Analog Input Module S Set all channel range code as 0x0143 10 V apax SetChannelRange 4 1 255 0x0143 User can use the apax GetChannellnfo command to check the result 172 191 118 Pal TY a Channel SENEDFRIETO sac ADSDIO lib version is Bx101 APAX 5017 S4 Type Ch Value Ch Status Range AI 8 9 9902 Normal 8 AI B 8882 Normal 1
38. sysroot usr local arm unknown linux gnueabi sys root enable languages c c java disable multilib with arch armv5t with tune xscale with float soft disable sjlj exceptions enable cxa atexit disable libmudflap enable threads posix enable target optspace with local prefix usr local arm unknown linux gnueabi sys root disable nls ena ble symvers gnu enable c99 enable long long hread model posix gcc version 4 2 2 adv adv desktop J Up till now user can use cross compile to compile your applications Information about how to develop applications will be introduced in later sections Note The cross tool chain is tested on following Linux distributions E Fedora Fedora10 Fedora11 Fedora12 Fedora13 Fedora14 Fedora15 Fedora16 Ubuntu Ubuntu8 04 Ubuntu8 10 Ubuntu9 04 Ubuntu9 10 Ubuntu10 04 Ubuntu10 10 Ubuntu1 1 04 Ubuntu11 10 Debian Debian5 0 Debian6 0 3 2 Quick start to develop application Here we will give an example to show how to develop an application and transfer your application to the APAX 5522 by using FTP or USB storage device The example is HelloWorld c the source code of this example is as follows include lt stdio h gt int main void printf Hello World n return 0 APAX 5071 Software Manual 14 3 2 1 Compile HelloWorld c 1 Create HelloWorld c on your Linux PC for example Ubuntu e adv adv desktop File Edit View Terminal Help main printf
39. t The LSB indicates the channel B FuncCode Mot use FuncCode The safety values from channel 32 to 63 to be set The LSB indicates the channel 32 For example APAX 5060 12 CH Relay Output Module S Set safety function enable apax_SetDoConfig 1 1 1 For example APAX 5028 4 8 CH High Speed Counter Module Setchannel 8 to 11 safety value as HIGH apax_SetDoConfig 1 2 0 User can use the apax_GetChannellnfo command to check the result Before APAX 5071 Software Manual 36 gi 172 19 1 118 Pu ITY Get Channel Information ADSDIO 1ib version is 1 Type Ch Value Hode safety value DO False BOOL Disable Di False BOOL Disable Di False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable False BOOL Disable ee UN Ee Go CN ok After E 172 19 1 118 PuTTY Get Channel Information ADSDIO lib version is 686x161 Type Ch Value Hode Safety value DO 8 False BOOL False DO False BOOL False DO False BOOL False False BOOL False False BOOL False False BOOL False False BOOL False False BOOL False False BOOL True False BOOL True False BOOL True False BOOL True DO DO DO DO sk MSG Ge OL en A sole 4 2 8 Set AO module configuration Instruction Function description apax_SetAoConfig Set the AO module configuration of the indicated slot Usage apax SetAoCo
40. th milliseconds apax SetCntConfig 2 2 0 S Setall channel counting start 3 apax_SetCntConfig 2 1 255 1 User can use the apax_GetChannellnfo command to check the result Before 41 APAX 5071 Software Manual P 172 19 A 118 Pr n Get Channel re ADSDIO lib version is 686x181 RPhs 5H8BH 32 b d ll E CHT Up and Down mode stop Hormal CHT Up and Down mode Stop Normal CHT Up mode stop Hormal CHT Frequency mode Stop Normal CHT ABI mode stop Hormal CHT mode stop Hormal CHT mode stop Hormal CHT mode stop Hormal Get Channel Tnforsiatiori ADSDIO lib version is Bx101 RPhs 5808H 52 Type Ch Value Mode Startup Counting Status CHT 18 Up and Down mode 18 Start Hormal CHT 16 Up and Doun mode 1H start Hormal CHT Up mode 8 Start Hormal CHT Frequency mode 8 Start Hormal CHT ABIX mode 8 Start Hormal CHT ABIX mode 8 Start Hormal CHT Up mode 8 Start Hormal CHT 8 Up mode 8 Start Hormal If the count status abnormal The counting will stop Users can clear the status as fol lowing command Clear channel 0 count status 4 apax SetCntConfig 2 4 0 User can use the apax_GetChannellnfo command to check the result Before C 172 191 111 Get Channel infornatiori ADSDIO lib version is 8211 I I LH por um LAI n2 th 4294967295 Up and Down Underflow 4294967295 Up and Down Unde
41. ual 28 Set single channel value Usage apax GetChannellnfo slotID channelType p msec n m Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 Func Type 1 set single DO value 3 set single AO value Channel ID The channel ID starts from 0 Value The channel value of the indicated channel DO module 1 High 0 Low AO module The channel value specified by the channel range Result Show set channel output done or failed message Set multi channel values Usage apax SetChannelValue slotID funcType DataLen paramO parami Parameters None Display online help Slot ID The slot ID which is ranged from 0 to 31 Func Type 2 set multi DO values 4 set multi AO values Data length The total of the parameter count if data length is 3 followed by 3 data param0 param1 param2 paramO DO module The DO values from channel 0 to 31 to be set It is DWORD value indicates the channel 0 to 31 AO module The channels mask From LSB to MSB of the value indicate If the bit is 1 it means that the channel must change value For example 11110000 0xf0 means the channel 4 to 7 must change value 29 APAX 5071 Software Manual paraml DO module The DO values from channel 32 to 63 to be set It is DWORD value indicates the channel 32 to 63 Bit 0 Indicates the channel 32 and bit 31 indicates the channel 63 AO module The channel value specified by the channel r

Download Pdf Manuals

image

Related Search

Related Contents

IPI, PLC CPU Module, GFK  Manual deinstalación y del usuario Watts 760  LG LXA0810ACL Air Conditioner  

Copyright © All rights reserved.
Failed to retrieve file