Moxa TC-6110-T-LX [47/74] G sensor accelerometer control code
![Moxa TC-6110-CT-LX [47/74] G sensor accelerometer control code](/views2/1200315/page47/bg2f.png)
TC-6110 / Windows 7 Customizable Sample Code
5-3
G-Sensor/Accelerometer Control Code
The TC-6110 computer comes with 2 independent accelerometers that may be used to monitor external
vibrations affecting the computer. The accelerometers are located on the board of each of the two SATA
expansion modules. The basic accelerometer control code is included under the title G-Sensor.exe, and it may
be found on the software DVD under
\examples\TC6000Release. The source code itself may be found
under
\examples\project\GSensor\. To review the accelerometer control code you may refer to
Appendix B of this manual, under
The Accelerometer Control Script.
You can follow the steps below to test the accelerometer. Please remember that the X-axis represents
front-to-back motion (relative to the sensor), the Y-axis is left-to-right, and the Z-axis is up-and-down. A good
target threshold to start off with is 1000 milligravities (mG), which is the basic tolerance threshold for many
industrial-quality hard drives.
Accelerometer Control Walkthrough
1. If you haven’t yet, create the folder c:\programs\examples, then copy over GSensor.exe.
2. Insert the TC-6110 SATA expansion module into slot 1. Leave slot 2 empty.
3. Run GSensor.exe and check to see if the G-sensor is registering raw vibration measurements. In the
screenshot below, because only the slot 1 SATA module has been inserted, the program is only showing
information for that accelerometer; this is indicated by the message GSensor on Disk1 is running.
Similarly, because no module is mounted in slot 2, the message GSensor on Disk 2 is unavailable is
displayed.
4. Following the two sensor messages indicating sensor operation, information for each available sensor is
shown; the origin of the raw data is indicated by the number in parentheses at the end of the label, just
before the equal sign. (0) indicates the accelerometer in slot 1; (1) indicates slot 2.
5. Data for each of the three axes is displayed separately, on a single line. The number shown is a raw two’s
complement notation binary data value, displayed in base ten form. This raw value must be converted
before it represents milligravities (mG). In the screenshot above, the only axis indicating vibration is the
z axis, which is showing 65517. To convert this number into milligravities, we must first convert it from
two’s complement representation and then multiply that result by a conversion ratio of 3.9 (base ten).
Using the number 65517, above, we first convert it to hexadecimal value. 65,517
10
= 1111111111101101
2
,
which is equal to FFED
16
. The left-most bit is a 1, so this means the number is a negative value and we
must convert from two’s complement notation. To do this, (-1)*(0xFFFF-0xFFED +1) = -13
16
, or -19 in
base ten (-19
10
). We then multiply this number by 3.9
10
to get the value in milligravities: -19 * 3.9
= -74.1.
To review the conversion code, check Appendix B,
Accelerometer Conversion Code.
ATTENTION
G
-sensor / accelerometer values are base 10 representations of raw binary data, and must first be
converted
using bitwise operations before they can be read as milligravities (mG). The formula for
conversion is to first convert the binary number from two’s complement notation into base 10
, then
multiply the result
by 3.9. For sample code, check Appendix B, Accelerometer Conversion Code.
Содержание
- Second edition june 2013 1
- Tc 6110 windows embedded standard 7 software manual 1
- Www moxa com product 1
- Copyright notice 2
- Disclaimer 2
- Tc 6110 windows embedded standard 7 software manual 2
- Technical support contact information 2
- Trademarks 2
- Www moxa com support 2
- Table of contents 3
- Introduction 4
- Software components 5
- Tc 6110 windows 7 introduction 5
- Tc 6110 windows 7 introduction 6
- System initialization 7
- Create a new user account 8
- Tc 6110 windows 7 system initialization 8
- Enabling windows 7 write protections 9
- Enhanced write filter 10
- Overview 10
- Tc 6110 windows 7 enabling windows 7 write protections 10
- Enabling enhanced write filter 11
- Ewfmgr c 11
- Tc 6110 windows 7 enabling windows 7 write protections 11
- Ewfmgr c 12
- Ewfmgr c commitanddisabl 12
- Ewfmgr c enabl 12
- Tc 6110 windows 7 enabling windows 7 write protections 12
- Enabling file based write filter 13
- Fbwfmgr displayconfi 13
- Fbwfmgr enabl 13
- File based write filter 13
- Overview 13
- Tc 6110 windows 7 enabling windows 7 write protections 13
- Fbwfmgr displayconfi 14
- Tc 6110 windows 7 enabling windows 7 write protections 14
- Installing moxa software 15
- Hot swap configuration and usage 16
- Installing mxhtsp 16
- Mxhtsp hot swapping for hard drives 16
- Overview 16
- Starting hot swap 16
- Drive usage notifications 17
- Tc 6110 windows 7 installing moxa software 17
- Unmounting and removing the storage drives 17
- User defined percentage of drive capacity 17
- Warning 17
- C program files moxa mxhtsp confi 18
- C program files moxa mxhtsp script 18
- Configuring hot swap settings 18
- Mxhtsp 18
- Mxhtspd 18
- Tc 6110 windows 7 installing moxa software 18
- Warning 18
- C program files moxa mxhtsp confi 19
- C program files moxa mxhtsp config script 19
- Moxa hot swap mxhtsp scripts 19
- Mxhtsp 19
- Tc 6110 windows 7 installing moxa software 19
- Warning 19
- Hot swap mxhtsp logs 20
- Installing the pdm diagnostics package 20
- Moxa predictive maintenance diagnostic tools 20
- Overview 20
- Attention 21
- Configuring and using the g sensor tool 21
- Launching the charting application 21
- Tc 6110 windows 7 installing moxa software 21
- Configuring the sensor logs 22
- Tc 6110 windows 7 installing moxa software 22
- Configuring the g sensor to signal an alarm 23
- Tc 6110 windows 7 installing moxa software 23
- Configuring and using the temperature sensor 24
- Tc 6110 windows 7 installing moxa software 24
- Overview 25
- Tc 6110 windows 7 installing moxa software 25
- The synmap design concept 25
- The synmap virtualization layer full interoperability with any moxa device 25
- Moxa synmap oids list 26
- Mxgpio_clos 26
- Mxgpio_get_data 26
- Mxgpio_open 26
- Mxgpio_set_dat 26
- Tc 6110 windows 7 installing moxa software 26
- Tc 6110 windows 7 installing moxa software 27
- Installing the synmap virtualization layer 28
- Mxsynmap_setup ms 28
- Tc 6110 windows 7 installing moxa software 28
- Tility 3 mxsynmap 28
- Installing and using an nms 29
- Installing moxa mxview 29
- Mxview_trial_v2 ms 29
- Tc 6110 windows 7 installing moxa software 29
- Tility 4 mxviewtria 29
- Basic configuration of mxview 30
- Tc 6110 windows 7 installing moxa software 30
- Tc 6110 windows 7 installing moxa software 31
- Warning 31
- Tc 6110 windows 7 installing moxa software 32
- Loading the synmap mib file 33
- Tc 6110 windows 7 installing moxa software 33
- Tc 6110 windows 7 installing moxa software 34
- C sr share snmp mibs 35
- Moxa sys mib tx 35
- Tc 6110 windows 7 installing moxa software 35
- Moxa sys mib values moxa embeddedcomputer moxasystem productinfomgmt 36
- Retrieving basic device information 36
- Tc 6110 windows 7 installing moxa software 36
- Using synmap oids to control the tc 6110 36
- Ledentry ledvalu 37
- Moxa sys mib values moxa embeddedcomputer moxasystem peripheralmgmt perledmgmt ledtable 37
- Tc 6110 windows 7 installing moxa software 37
- Using synmap to control the programmable leds 37
- Tc 6110 windows 7 installing moxa software 38
- Using synmap to set the os power policy 38
- Attention 39
- Moxa sys mib values moxa embeddedcomputer moxasystem powermgmt powerpolic 39
- Tc 6110 windows 7 installing moxa software 39
- Using synmap to read the temperature sensor 39
- Moxa sys mib values moxa embeddedcomputer moxasystem sensormgmt sensorobject tempsensortabl 40
- Tc 6110 windows 7 installing moxa software 40
- Moxa sys mib values moxa embeddedcomputer moxasystem sensormgmt sensorobject accelerometertabl 41
- Tc 6110 windows 7 installing moxa software 41
- Using synmap to read the g sensor 41
- Tc 6110 windows 7 installing moxa software 42
- Using synmap to enable and configure the watchdog timer 42
- Moxa sys mib values moxa embeddedcomputer moxasystem peripheralmgmt persystemmgmt watchdogstatu 43
- Moxa sys mib values moxa embeddedcomputer moxasystem peripheralmgmt systemwatchdog watchdog perio 43
- Tc 6110 windows 7 installing moxa software 43
- Tc 6110 windows 7 installing moxa software 44
- Customizable sample code 45
- C programs example 46
- Examples project led 46
- Examples tc6000releas 46
- Sample code for customizing the tc 6110 46
- Tc 6110 windows 7 customizable sample code 46
- The led control walkthrough 46
- Accelerometer control walkthrough 47
- Attention 47
- C programs example 47
- Examples project gsensor 47
- Examples tc6000releas 47
- G sensor accelerometer control code 47
- Tc 6110 windows 7 customizable sample code 47
- C programs example 48
- Examples project tempsensor 48
- Examples project watchdog 48
- Examples tc6000releas 48
- Pdwportval 0x8 48
- Pdwportval 0xc 48
- T sensor control code 48
- Tc 6110 windows 7 customizable sample code 48
- The watchdog control code walkthrough 48
- Walkthrough for reading temperature values 48
- Watchdog control code 48
- Gps control code 49
- Retrieving gps data 49
- Tc 6110 windows 7 customizable sample code 50
- Tc 6110 windows 7 customizable sample code 51
- Closehandle 52
- Createfile 52
- Gpsdatasize null 52
- Handle handleport createfile com3 generic_read generic_write 0 null open_existing 0 null 52
- Readfile 52
- Readfile handleport inputdata inputdatasize gpsdata 52
- Tc 6110 windows 7 customizable sample code 52
- System recovery 53
- Overview setting up the recovery environment 54
- Recovery tc6110w7 54
- Recovery tc6110w7e clonezillafactory_2013 02 21 14 54
- Step 1 prepare the usb drive 54
- Tc 6110 windows 7 system recovery 54
- Tuxboot windows 23 exe 54
- F home partimag 55
- Tc 6110 windows 7 system recovery 55
- Tc6110w7e recovery os_imag 55
- Attention 56
- Step 2 setting the bios to boot via usb 56
- Tc 6110 windows 7 system recovery 56
- F home partimag 57
- Step 3 opt create a custom system image 57
- Tc 6110 windows 7 system recovery 57
- Home partima 58
- Tc 6110 windows 7 system recovery 58
- Tc 6110 windows 7 system recovery 59
- Warning 59
- Step 4 reset bios to original state 60
- Step 5 perform a test restoration 60
- Tc 6110 windows 7 system recovery 60
- Tc 6110 windows 7 system recovery 61
- Tc 6110 windows 7 system recovery 62
- The 2013 synmap oid table 63
- Moxa synmap the full oid table 64
- Tc 6110 windows 7 the 2013 synmap oid table 64
- Tc 6110 windows 7 the 2013 synmap oid table 65
- Tc 6110 windows 7 the 2013 synmap oid table 66
- Tc 6110 windows 7 the 2013 synmap oid table 67
- Sample code for tc 6110 customization 68
- The led control script 69
- The accelerometer control script 71
- Accelerometer conversion code 73
- The watchdog control script 73
- The temperature sensor control script 74
Похожие устройства
- Moxa TC-6110-T-LX Руководство по аппаратной части
- Moxa TC-6110-T-LX Технические характеристики
- Moxa TC-6110-T-LX Руководство по быстрой установке
- Moxa TC-6110-T-LX Руководство по программной части (Linux)
- Moxa TC-6110-W7E Инструкция по эксплуатации
- Moxa TC-6110-W7E Руководство по аппаратной части
- Moxa TC-6110-W7E Технические характеристики
- Moxa TC-6110-W7E Руководство по быстрой установке
- Moxa TC-6110-W7E Руководство по программной части (Linux)
- Moxa TC-6110-T-W7E Инструкция по эксплуатации
- Moxa TC-6110-T-W7E Руководство по аппаратной части
- Moxa TC-6110-T-W7E Технические характеристики
- Moxa TC-6110-T-W7E Руководство по быстрой установке
- Moxa TC-6110-T-W7E Руководство по программной части (Linux)
- Moxa TC-6110-CT-LX Инструкция по эксплуатации
- Moxa TC-6110-CT-LX Руководство по аппаратной части
- Moxa TC-6110-CT-LX Технические характеристики
- Moxa TC-6110-CT-LX Руководство по быстрой установке
- Moxa TC-6110-CT-LX Руководство по программной части (Linux)
- Moxa TC-6110-CT-T-LX Инструкция по эксплуатации