# Set up the beckhoff to match the SSI sensor # Assumes binary output, make sure to do grey -> binary conversion if needed # # # # ## Assumes Beckhof KL5001 set up as follows # Format: Standard # Complete Evaluation: 1 # MOTOROLA format: 0 # Word alignment: 1 # ## This will give the following mapping # # I/O Offset High Byte Low Byte # 3 - - # 2 D3 D2 # 1 D1 D0 # 0 - CT/ST # ## Ex TR Electronic LTS 140 Setup (binary output) # [ ] Gray-binary number conversion # [ ] Alternative output format # [x] Synchronous Mode # [ ] Single-turn evaluation of the sensor # [ ] Disable Frame-Error # # 24 Bits # 250 KHz baud rate record( longin, "$(APC):M$(SLOT)_CH$(CH)_STAT"){ field( DTYP, "asynUInt32Digital") field( INP, "@asynMask($(PORT) $(OFF1) 0xffff)") field( SCAN, "I/O Intr") field(HIGH, "1") field(HSV, "MAJOR") field( FLNK, "$(APC):M$(SLOT)_CH$(CH)_SSIER") } record( calcout, "$(APC):M$(SLOT)_CH$(CH)_SSIER"){ field(DESC, "SSI Input Error") field(INPA, "$(APC):M$(SLOT)_CH$(CH)_STAT MS") field(CALC, "A & 0x1") field(HIGH, "1") field(HSV, "MAJOR") field(FLNK, "$(APC):M$(SLOT)_CH$(CH)_FRMER") } record( calcout, "$(APC):M$(SLOT)_CH$(CH)_FRMER"){ field(DESC, "Frame Error") field(INPA, "$(APC):M$(SLOT)_CH$(CH)_STAT MS") field(CALC, "(A >> 1) & 0x1") field(HIGH, "1") field(HSV, "MAJOR") field(FLNK, "$(APC):M$(SLOT)_CH$(CH)_ERRR") } record( calcout, "$(APC):M$(SLOT)_CH$(CH)_ERRR"){ field(DESC, "General Error") field(INPA, "$(APC):M$(SLOT)_CH$(CH)_STAT MS") field(CALC, "(A >> 6) & 0x1") field(HIGH, "1") field(HSV, "MAJOR") field(FLNK, "$(APC):M$(SLOT)_CH$(CH)_SSIER") } record(ai, "$(APC):M$(SLOT)_CH$(CH)_SIG") { field(DESC, "SSI Data") field(DTYP,"asynInt32") field(INP,"@asyn($(PORT) $(OFF2)) INT32_LE_ALT") field(LINR, "$(LINR)") field(SCAN, "I/O Intr") field(EGU, "$(EGU)") field(HHSV, "NO_ALARM") field(LLSV, "NO_ALARM") field(HSV, "NO_ALARM") field(LSV, "NO_ALARM") }