To use this file copy and paste this:    // #URL-lib "http://pin1.org/forthlib/flb/IASI2/BV4501-relay.flb"   into BV Terminal 3 or here to download.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // BV4501 - IASI Twin Relay Default address 'b' // This will load as a stand alone file or can be used as a library // providing the parent file includes the files in the REQUIRES // section // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// HISTORY: // Nov 2008 *Preliminary

// REQUIRES: // #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=0 // #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101 // #URL-lib "http://pin1.org/forthlib/flb/IASI2/IASI2-a.flb"

// CONSTANTS: integer i-relay-adr // set this before using


Full Contents of File

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BV4501 - IASI Twin Relay Default address 'b'
// This will load as a stand alone file or can be used as a library
// providing the parent file includes the files in the REQUIRES
// section
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// REQUIRES:
// #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=0
// #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101
// #URL-lib "http://pin1.org/forthlib/flb/IASI2/IASI2-a.flb"

// HISTORY:
// Nov 2008 *Preliminary

// CONSTANTS:
integer  i-relay-adr          // set this before using

// ---------------------------------------------------------------
// Initialise and show devices
: init
        i-report
;                       
// ---------------------------------------------------------------
// relay A on /off 0 = on 1 = off
: rlyA ( onoff -- )
        i-relay-adr  emit1  [char]  a  emit1
        48  +  emit1  cr1  // 48 converts ro ascii 0 or 1
;

// ---------------------------------------------------------------
// relay B on /off 0 = on 1 = off
: rlyB ( onoff -- )
        i-relay-adr  emit1  [char]  b  emit1
        48  +  emit1  cr1  // 48 converts ro ascii 0 or 1
;