Pni TCM Bedienungsanleitung Seite 64

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 77
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 63
PNI Sensor Corporation DOC#1014688 r06
TCM User Manual July 2013 Page 59
7.4 Code Examples
The following example files, CommProtocol.h, CommProtocol.cp, TCM.h and TCM.cp
would be used together for proper communication with a TCM module.
Note: The following files are not included in the sample codes and need to be created by the user:
Processes.h & TickGenerator.h. The comments in the code explain what is needed to be sent or
received from these functions so the user can write this section for the users platform. For example,
with the TickGenerator.h, the user needs to write a routing that generates 10 msec ticks.
7.4.1 Header File & CRC-16 Function
/ / t ype decl ar at i ons
t ypedef st r uct
{
UI nt 8 Acqui si t i onMode, Fl ushFi l t er ;
Fl oat 32 Acqui r eDel ay, Sampl eDel ay;
} __at t r i but e__ ( ( packed) ) AcqPar ams;
t ypedef st r uct
{
Fl oat 32 MagCal Scor e;
Fl oat 32 r eser ve1;
Fl oat 32 Accel Cal Scor e;
Fl oat 32 Di st Er r or ;
Fl oat 32 Ti l t Er r or ;
Fl oat 32 Ti l t Range;
} __at t r i but e__ ( ( packed) ) MagCal Scor e;
enum
{
/ / Fr ame I Ds ( Commands)
kGet ModI nf o = 1, / / 1
kGet ModI nf oResp, / / 2
kSet Dat aComponent s, / / 3
kGet Dat a, / / 4
kGet Dat aResp, / / 5
kSet Conf i g, / / 6
kGet Conf i g, / / 7
kGet Conf i gResp, / / 8
kSave, / / 9
kSt ar t Cal , / / 10
kSt opCal , / / 11
kSet Fi l t er s, / / 12
kGet Fi l t er s, / / 13
kGet Fi l t er sResp, / / 14
kPower Down, / / 15
kSaveDone, / / 16
kUser Cal SampCount , / / 17
kCal Scor e, / / 18
kSet Conf i gDone, / / 19
kSet Fi l t er sDone, / / 20
kSt ar t Cont i nuousMode, / / 21
kSt opCont i nuousMode, / / 22
kPower Up, / / 23
Seitenansicht 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 76 77

Kommentare zu diesen Handbüchern

Keine Kommentare