A.3. The testbed.cfg Configuration File

The following is the driver configuration file used with this test scenario.

;;;
;;; Define the I/O points for the Cogent Portable FieldBus Testbed Hardware
;;; =======================================================================
;;;

;;;
;;; Declare a typical analog point type which will allow us to reduce our
;;; typing requirements and to change parameters on entire groups of points
;;; at once if necessary.  A constant inside a type will use any define
;;; statements which appear before it in the file.
;;;

(type AI analog t %1 %2 r 0 t 0 32767 0 %3)
(typeDesc AI "(AI point_name address eng_units_max)")
(type AO analog t %1 %2 rw 0 t 0 32767 0 %3)
(typeDesc AO "(AO point_name address eng_units_max)")
(type DI digital t %1 %2 r 0 t)
(typeDesc DI "(DI point_name address)")
(type DO digital t %1 %2 rw 0 t)
(typeDesc DO "(DO point_name address)")
(type GI group t %1 0 r %2)
(typeDesc GI "(GI point_name update_rate child)")
(type GO group t %1 0 rw %2)
(typeDesc GO "(GO point_name update_rate child)")

; define the id of card acting as scanner
;(define SCANNER1 0)
; define MAC ID of the WAGO IO System
;(define WAGO 2)

;;;
;;; Define analog points
;;; (analog enable-flag name address R|W|RW cycle-millisecs exception-flag
;;;  raw-min raw-max eng-unit-min eng-unit-max)

(analog t volumeLeft SCANNER1:1.WAGO:0 r 0 t 0 32767 0 100)
;(AI volumeLeft  SCANNER1:1.WAGO:0 100)
(AI volumeRight SCANNER1:1.WAGO:1 100)

(AO meterLeft  SCANNER1:0.WAGO:0 10)
(AO meterRight SCANNER1:0.WAGO:1 10)
;;; NOTE if device byte order is reverse, use -e0 flag to perform byte swap
;;;    eg:  (AI volumeLeft  0:0;-e0 100)

;;;
;;; Define digital points
;;; (digital enable-flag name address R|W|RW cycle-millisecs exception-flag)
;;;

(DI thumbwheel 		SCANNER1:1.WAGO:2.1.4)
(DI pushon_pushoff 	SCANNER1:1.WAGO:2.5)
(DI pushbutton 		SCANNER1:1.WAGO:2.6)
(DI sonalertFault 	SCANNER1:1.WAGO:2.11)
(DI counterFault 	SCANNER1:1.WAGO:2.13)

(DI Buttons 		SCANNER1:1.WAGO:2.05.2)
(DI DI_Byte 		SCANNER1:1.WAGO:2.1.8)

(DO GreenLight1 	SCANNER1:0.WAGO:2.1)
(DO GreenLight2 	SCANNER1:0.WAGO:2.2)
(DO RedLight1 		SCANNER1:0.WAGO:2.3)
(DO RedLight2 		SCANNER1:0.WAGO:2.4)
(DO RedLight3 		SCANNER1:0.WAGO:2.5)
(DO RedLight4 		SCANNER1:0.WAGO:2.6)
(DO sonalert 		SCANNER1:0.WAGO:2.7)
(DO counter  		SCANNER1:0.WAGO:2.8)

(DO DO_Byte 		SCANNER1:0.WAGO:2.1.8)
(DO SonCnt 		SCANNER1:0.WAGO:2.7.2) 

;;;
;;; Define groups.
;;; (group enable-flag name address R|W|RW cycle-millisecs point...)
;;;

(group t dingroup 0 r 50 thumbwheel pushon_pushoff pushbutton
	sonalertFault counterFault Buttons DI_Byte)
(group t agroup 0 r 100 volumeLeft meterLeft volumeRight meterRight)
(group t doutgroup 0 rw 50 GreenLight1 GreenLight2
	RedLight1 RedLight2 RedLight3 RedLight4 sonalert counter 
	DO_Byte SonCnt)

(cardGroup SCANNER1 agroup dingroup doutgroup)

;;; Define buffer configuration.
;;; (defineSegment device buffer type r|w|rw [ offset [ size] ] )
;;;

;(segmentDefine SCANNER1 1 analog r 0 4)
;(segmentDefine SCANNER1 1 digital r 4 3)

;(segmentDefine SCANNER1 0 analog w 0 4)
;(segmentDefine SCANNER1 0 digital w 4 2)