Products
Controllers
Controllers Overview
AC24 – HVAC controller
CC18 – Low cost, compact 16 I/O controller w/ analog
DA8 – DIN with analogue
DC216 – DIN with UI
DM16 – DIN with 16 DIO
DPH1 – DIN with pH measurement
DR240 – DIN with opto-in & 8 mains relays
DR240A – DIN with opto-in, 8 mains relays & with analogue
DR8 – DIN with 8 relays
DT16 – DIN with 16 DIO
DTS2 – DIN with temperature sensor
DW2 – DIN for load cells
EC1 – EasyOne board
HD8 – Electronic Display controller
HMI430 – 4.3″ Touch screen controller
HMI700 – 7″ Touch screen controller
HVAC26A – Air conditioner controller
MMi203A – Operator interface and analog
MS121 – Lowest cost HMI controller
SL100 – 16 DIO + 2 AIO
UI216 – Remote HMI
UI420 – Remote HMI
SGSC-02 – Solar Hot Water
Standard Products
Standard Products Overview
Special functions
Special functions Overview
SX10500 – Thermocouple (K) x 2
SX10502 – Temperature & Humidity
SX10504 – Fluid level & analog I/O
SX10505 – Analog out x4
SX10506 – Pressure Sensor
SX10508 – Data Logger (SD card)
SX10509 – Internet interface
SPice10200 – Fluid levels + temperature
SPice10203 – Push buttons
SPice10204 – Current transformer
SPice10205 – Fluid levels x 6
SPice10211 – Analog I/O
SPice10212 – AC voltage measurement
SPice10213 – DC Motor Control
SPice10214 – Potentiometer interface
SPice10218 – 8 channel analog input multiplexer
SPice10219 – Half Duplex 433/915MHz wireless
Accessories
Accessories Overview
PC232
PCUSB
USB232
BT-TTL5
BT-TTL3.3
BT-RS232
PSUS24630 (US sales only)
DB9MF-6
XP485
MB485
PC485
ULNX6
Crimping Tool
SPx Expansion
SPx Expansion Overview
XBIO16 – 16 digital I/O points
MBIO16 – 16 digital I/O points, 2A outputs
FP16 – 8DI, 8DO
XIRO16 – 8 5A/24V relays and 8 inputs
HIO16 – 8 high power relays, 8 isolated inputs
Custom products
Custom products Overview
I/O Adapters
I/O Adapters Overview
RLX8 – 8 relays
IOX44 – 4 relays, 4 input isolators
Controllers Overview
AC24 – HVAC controller
CC18 – Low cost, compact 16 I/O controller w/ analog
DA8 – DIN with analogue
DC216 – DIN with UI
DM16 – DIN with 16 DIO
DPH1 – DIN with pH measurement
DR240 – DIN with opto-in & 8 mains relays
DR240A – DIN with opto-in, 8 mains relays & with analogue
DR8 – DIN with 8 relays
DT16 – DIN with 16 DIO
DTS2 – DIN with temperature sensor
DW2 – DIN for load cells
EC1 – EasyOne board
HD8 – Electronic Display controller
HMI430 – 4.3″ Touch screen controller
HMI700 – 7″ Touch screen controller
HVAC26A – Air conditioner controller
MMi203A – Operator interface and analog
MS121 – Lowest cost HMI controller
SL100 – 16 DIO + 2 AIO
UI216 – Remote HMI
UI420 – Remote HMI
SGSC-02 – Solar Hot Water
Standard Products Overview
Special functions Overview
SX10500 – Thermocouple (K) x 2
SX10502 – Temperature & Humidity
SX10504 – Fluid level & analog I/O
SX10505 – Analog out x4
SX10506 – Pressure Sensor
SX10508 – Data Logger (SD card)
SX10509 – Internet interface
SPice10200 – Fluid levels + temperature
SPice10203 – Push buttons
SPice10204 – Current transformer
SPice10205 – Fluid levels x 6
SPice10211 – Analog I/O
SPice10212 – AC voltage measurement
SPice10213 – DC Motor Control
SPice10214 – Potentiometer interface
SPice10218 – 8 channel analog input multiplexer
SPice10219 – Half Duplex 433/915MHz wireless
Accessories Overview
PC232
PCUSB
USB232
BT-TTL5
BT-TTL3.3
BT-RS232
PSUS24630 (US sales only)
DB9MF-6
XP485
MB485
PC485
ULNX6
Crimping Tool
SPx Expansion Overview
XBIO16 – 16 digital I/O points
MBIO16 – 16 digital I/O points, 2A outputs
FP16 – 8DI, 8DO
XIRO16 – 8 5A/24V relays and 8 inputs
HIO16 – 8 high power relays, 8 isolated inputs
Custom products Overview
I/O Adapters Overview
RLX8 – 8 relays
IOX44 – 4 relays, 4 input isolators
Service + Support
Downloads
Download description
SPLat/PC 32-bit
Firmware & reFlash
SimpleHMI
Active Templates
C programming
Program Downloader
SPLogger
Outlines, schematics etc
Knowledge Base
Knowledge Base Home
Industry Applications
Industry Applications
Software Solutions
Software Solutions
Download description
SPLat/PC 32-bit
Firmware & reFlash
SimpleHMI
Active Templates
C programming
Program Downloader
SPLogger
Outlines, schematics etc
Knowledge Base Home
Industry Applications
Software Solutions
Orders
About
About Us
Contact Us
Case Studies
Media
Contact Us
Contact Us
Products search
0
AUD
USD
CAD
EUR
Home
Knowledge Base
Knowledge Base
Product documentation
0.1" Connectors
Product documentation: Controllers
CC18 product documentation
CC18: Introduction
Getting started with your controller
CC18: Using this document
Other resources
CC18: Product overview
Some common terminology
CC18: Connections
CC18: Where to get matching connectors
CC18: Power supply
CC18: External inputs and outputs
CC18: Bidirectional points used as inputs
CC18: Analog inputs
CC18: Non-volatile memory
CC18: Permanent memory
CC18: Shadow memory
CC18: NVEM0
CC18: OnBoard Counter type A (OBCA)
CC18: OnBoard Counter type B
CC18: OnBoard Quadrature Counter (OBQC)
CC18: Bicolor status LED
CC18: CPU device
CC18: Comms connector
CC18: Communications
CC18: Xwire
CC18: Programming
CC18: Programming cable
CC18: MultiTrack
CC18: Timing accuracy
CC18: Operating temperature ratings
CC18: Firmware revisions and reFlashing
CC18: reFlashing
CC18: Firmware version history and updates
CC16: Firmware version history and updates
CC16/18 specific accessories
CCBB breakout board (for development use)
CC16TB terminal board (for production use)
DA8 Product Documentation
DA8 Technical Specification
DA8 I/O Map
DA8 Non-volatile memory
DC216 Product Documentation
DC216 Technical specification
DC216 I/O Map
DC216: OnBoard Quadrature Counter (OBQC)
DC216 Non-volatile memory
DC216 Xwire Interface
DM16 Product Documentation
DM16 I/O Map
DM16 Xwire Interface
DM16 Non-volatile memory
DR240 Product Documentation
DR240 I/O Map
DR240 Non-volatile memory
DR240A Product Documentation
DR240A I/O Map
DR240A Non-volatile Memory
DT16 Product Documentation
DT16 I/O Map
DT16 Xwire Interface
DT16 Non-volatile memory
DTS2: Product Documentation
DTS2: Technical specification
DTS2: I/O Map
DTS2: Non-volatile memory
HD8 Product documentation
HD8: Introduction
HD8: Using this document
Other resources
Getting started with your controller
HD8: Product overview
HD8: Connections
HD8: Where to get matching connectors
Some common terminology
HD8: Power supply
HD8: External inputs and outputs
HD8: Bidirectional points used as inputs
HD8: Bidirectional points used as outputs
HD8: Analog inputs
HD8: Analog outputs
HD8: Operator interface
HD8: Non-volatile memory
HD8: Permanent memory
HD8: Shadow memory
HD8: NVEM0
HD8: OnBoard Counter type B
HD8: OnBoard Quadrature Counter
HD8: CPU device
HD8: Option links/Xwire address setting
HD8: Comms connector
HD8: Communications
HD8: Xwire
HD8: Programming
HD8: Programming cable
HD8: Operating temperature ratings
HD8: Firmware revisions and reFlashing
HD8: reFlashing
HD8: Firmware version history and updates
HMI430/700 product documentation
HMI700 3.3V Calibration
HMI430/700: I/O Map (Source Code)
HMI - Simple Example
HMI430: Technical specification
HMI430: EMC Report
HMI700: EMC Report
HMI430/700: USB Driver
HMI430/700: File System
HMI430/700: Power supply
HMI430/700: External inputs and outputs
HMI430/700: Where to get matching connectors
HMI430/700: Digital inputs
HMI430/700: Digital outputs
HMI430/700: Analog inputs
HMI430/700: Analog output
HMI430/700: Communication ports
HMI430/700: TTL serial ports
HMI430/700: RS485 serial port
HMI430/700: Xwire port (TTL level)
HMI430/700: OnBoard Counter type A (OBCA)
HMI430/700: OnBoard Counter type B (OBCB)
HMI430/700: Beeper
HMI430/700: Crosshairs
HMI430/700: Non-volatile memory
HMI430/700: Permanent memory
HMI430/700: Shadow Memory
HMI430/700: NVEM0 (Read Only)
HMI430/700: NVEM1 (Read/Write)
HMI430/700: NVEM2 (Read/Write)
HMI430/700: NVEM3 (Read/Write)
HMI430/700: Touchscreen calibration
HMI430: Fitting into your product
Utilities
ui_utils.spt
Fontmake
System Calls (The CPU device)
The CPU device
CPU: Firmware revision
CPU: Dialect
CPU: Board type
CPU: I/O configuration
CPU: Subroutine nesting depth
CPU: Runtime error codes
CPU: Processor reset flags
CPU: DTR input
CPU: Miscellaneous resources (D>=16)
CPU: RTS output
CPU: Altering SuperTimer 10mS timebase [D>=20]
CPU: Processor temperature
MMi203 product documentation
MMixxx: Introduction
Getting started with your controller
MMi203: Using this document
MMi203: Product overview
MMi203: Differences from previous models
MMi203: Making external connections
Some common terminology
MMi203: Where to get matching connectors
MMi203: Power supply
MMi203: External inputs and outputs
MMi203: External digital inputs
MMi203: Input response times
MMi203: External digital outputs
MMi203: External analog inputs
MMi203: External analog outputs
MMi203: Operator interface
MMi203: Front panel push buttons
MMi203: Front panel LEDs
MMi203: Liquid crystal display
MMi203: Beeper
MMi203: Graphic overlays
MMi203: Face plate
MMi203: Real Time Clock
MMi203: Non-volatile memory
MMi203: Permanent memory
MMi203: Shadow memory
MMi203: NVEM0
MMi203: OnBoard Counter type A (OBCA)
MMi203: OnBoard Counter type B (OBCB)
MMi203: OnBoard Quadrature Counter (OBQC)
MMi203: Programming
MMi203: Programming cable
MMi202: CPU device
MMi203: CPU device
MMi99: CPU Device
MMi203: Option links
MMi203: SPice connector
MMi203: Xwire
MMi202: Comms connector
MMi203: Comms connector
MMi203: Communications
MMi203: MultiTrack
MMi203: Operating temperature ratings
MMi203: Firmware revisions and reFlashing
MMi202: Firmware version history and updates
MMi201: Firmware version history and updates
MMi200: Firmware version history and updates
MMi99: Firmware version history and updates
MS120 product documentation
MS120: Introduction
Getting started with your controller
MS120: Using this document
Other resources
MS120: Product overview
MS120: Differences from previous model
MS120: Connections and adjustments
Some common terminology
MS120: Where to get matching connectors
MS120: Power supply
MS120: External inputs and outputs
MS120: Bidirectional points used as inputs
MS120: Bidirectional points used as outputs
MS120: Dedicated NPN/PNP inputs
MS120: Operator interface
MS120: Non-volatile memory
MS120: Permanent memory
MS120: Shadow memory
MS120: NVEM0
MS120: Onboard counter type A (OBCA)
MS120: OnBoard Counter type B
MS120: OnBoard Quadrature Counter
MS120: CPU device
CPU: Processor temperature
MS120: SPice connectors
MS120: Comms connector
MS120: Communications
MS120: Xwire
MS120: Programming
MS120: Programming cable
MS120: MultiTrack
MS120: Firmware revisions and reFlashing
MS120: reFlashing
MS120: Firmware version history and updates
MS12: Firmware version history and updates
MS120 specific accessories
MS120TB terminal board (for production use)
SL100 product documentation
SL100: Introduction
Getting started with your controller
SL100: Using this document
Other resources
SL100: Product overview
SL100: Making external connections
Some common terminology
SL100: Where to get matching connectors
SL100: Power supply
SL100: External inputs and outputs
SL100: External digital inputs
SL100: External digital outputs
SL100: External analog input
SL100: External analog output
SL100: Non-volatile memory
SL100: Permanent memory
SL100: Shadow memory
SL100: NVEM0
SL100: Onboard counter type A (OBCA)
SL100: OnBoard Counter type B
SL100: OnBoard Quadrature Counter
SL100: CPU device
SL100: Option links
SL100: SPice connector
SL100: Xwire
SL100: Comms connector
SL100: Communications
SL100: Programming
SL100: Programming cable
SL100: MultiTrack
SL100: Operating temperature ratings
SL100: Firmware revisions and reFlashing
SL100: reFlashing
SL100: Firmware version history and updates
SL99: Firmware version history and updates
CC16 product documentation
DR8 product documentation
DW2 Product Documentation
MMi99 Product documentation
MMi200 product documentation
MMi201 Product documentation
MMi202 Product documentation
SL99 product documentation
Product documentation: Expansion boards
MBIO16: 16 bidirectional I/O with high current MOSFET outputs
MBIO16: Introduction
MBIO16: Compatibility
MBIO16: Power requirements
MBIO16: Inputs and outputs
Some common terminology
MBIO16: Where to get matching connectors
MBIO16: I/O connections
MBIO16: Connecting input devices
MBIO16: Connecting output devices
MBIO16: Connecting to a SPLat controller
MBIO16: Programming
FP16: 8 inputs (NPN/PNP) and 8 outputs
FP16: Introduction
FP16: Compatibility
FP16: Timing restrictions
FP16: Power requirements
FP16: Inputs and outputs
FP16: Some common terminology
FP16: Where to get matching connectors
FP16: Connecting input devices
FP16: Connecting output devices
FP16: Connecting to a SPLat controller
FP16: Programming
XBIO16: 16 bidirectional I/Os
XBIO16: Introduction
XBIO16: Compatibility
XBIO16: Timing restrictions
XBIO16: Power requirements
XBIO16: Inputs and outputs
XBIO16: Some common terminology
XBIO16: Where to get matching connectors
XBIO16: I/O connections
XBIO16: Connecting input devices
XBIO16: Connecting output devices
XBIO16: Connecting to a SPLat controller
XBIO16: Programming
XIRO16: 8 inputs and 8 relay outputs (5A)
XIRO16: Introduction
XIRO16: Compatibility
XIRO16: Safety considerations
XIRO16: Timing restrictions
XIRO16: Power requirements
XIRO16: Inputs and outputs
XIRO16: Some common terminology
XIRO16: Where to get matching connectors
XIRO16: Connecting input devices
XIRO16: Connecting output devices
XIRO16: Relay ratings
XIRO16: Connecting to a SPLat controller
XIRO16: Programming
HIO16: 8 high power relays (20A/1HP) and 8 isolated inputs
HIO16: Introduction
HIO16: Safety considerations
HIO16: Compatibility
HIO16: Timing considerations
HIO16: Power requirements
HIO16: Inputs and outputs
Some common terminology
HIO16: Where to get matching connectors
HIO16: Connecting input devices
HIO16: Connecting to output relays
HIO16: Relay ratings
HIO16: Connecting to a SPLat controller
HIO16: Programming
Product documentation: SPice add-on boards
SPice10200 - Temperature measurement and fluid level switching
SPice 10200: Introduction
SPice 10200: A quick tour
SPice 10200: Fitting to controller
SPice 10200: Power supply requirements
SPice 10200: External connections
SPice 10200: About water level detection
SPice 10200: About temperature measurement
SPice 10200: Programming
SPice10203 - 4 extra push buttons
SPice 10203: Introduction
SPice 10203: Installation
SPice 10203: Programming
SPice10204 - Current transformer
SPice 10204: A quick tour
SPice 10204: Safety Warning
SPice 10204: Fitting to controller
SPice 10204: Power supply requirements
SPice 10204: Current sensing wire and ranging
SPice 10204: Preset potentiometers
SPice 10204: Programming
SPice 10204: Accuracy and calibration considerations
SPice10205 - 6 fluid level switches
SPice 10205: Introduction
SPice 10205: A quick tour
SPice 10205: Fitting to controller
SPice 10205: Power supply requirements
SPice 10205: External connections
SPice 10205: About water level detection
SPice 10205: Programming
SPice10206 - 3rd party embedded web server support
SPice10206: Getting started
SPice10206: What you can achieve with SitePlayer Server
SPice10206: Anywhere on the Web
SPice10206: Simple hardware I/O
SPice10206: SitePlayer Server and web pages
SPice10206: UDP messages
SPice10206: Generating email
SPice10206: Cellphones
SPice10206: Fitting to controller
SPice10206: Power supply requirements
SPice10206: Programming
SPice10209 - Type K thermocouple interface
SPice10209: Fitting to controller
SPice10209: Power supply requirements
SPice10209: Thermocouple connections
SPice10209: Memory map
SPice10209: SPice pins
SPice10209: Programming
Example: Simple read and display using SPice10209
Example: Read and display SPice10209 with full TSP and LCD handshaking
SPice10211 - Analog I/O
SPice10211: Fitting to controller
SPice10211: Power supply requirements
SPice10211: Analog outputs
SPice10211: Analog inputs
SPice10211: Potentiometers
SPice10211: Programming
Example: "Analog" timer setting using potentiometers
Example: Reading out the SPice10211 potentiometers
SPice10212 - 3-phase VAC measurement
SPice10212: Fitting to controller
SPice10212: Power supply requirements
SPice10212: Measurement inputs
SPice10212: Calibration
SPice10212: Nonlinearity correction
SPice10212: Programming
Example: SPice10212 calibration with LCD
Example: SPice10212 calibration without LCD
Example: SPice10212 nonlinearity correction
SPice10213: DC motor control
SPice10213: Ratings
SPice10213: Fitting to controller
SPice10213: Power supply requirements
SPice10213: Connecting motors
SPice10213: Programming
Example: Dynamic braking with SPice10213
Example: Simple motor speed control with SPice10213
Example: Advanced motor control with SPice10213
Sequencer SPLatMap
Program code
SPice10214 - Potentiometer interface
SPice10214: Introduction
SPice10214: Fitting to controller
SPice10214: Power supply requirements
SPice10214: Connecting external potentiometers
SPice10214: Onboard potentiometer
SPice10214: Programming
SPIce 10218 - 8 channel analog input multiplexer
SPice10218: Fitting to controller
SPice10218: Power supply requirements
SPice10218: Analog inputs
SPice10218: Programming
Product documentation: Xwire peripherals
SX10500: Dual K-type thermocouple board
SX10500: Connecting to your controller
SX10500: Power supply requirements
SX10500: Thermocouple connections
SX10500: Selecting and setting address
SX10500: Programming
SX10501: Ultrasonic distance measurement + Non-Contact Temperature Measurement (Optional)
SX10501: Connecting to your controller
TN9301 peripheral non-contact temperature measurement.
TN9301 Specification
TN9301 Wiring Diagram
SX10501: Power supply requirements
SX10501: Selecting and setting address
SX10501: Ultrasonic sensor
SX10501: Programming
SX10502/SX10502RH: On board Temperature and Humidity Measurement + Non-Contact Temperature Measurement (Optional)
SX10502/SX10502RH: Connecting to your controller
SX10502/SX10502RH: Power supply requirements
SX10502/SX10502RH: Selecting and setting address
SX10502RH: Onboard temperature/RH sensor
SX10502/SX10502RH: Programming
SX10504: Water Level Detector + Analog I/O
SX10504: Connecting to your controller
SX10504: Analogue channel jumper configuration
SX10504: Power supply requirements
SX10504: Selecting and setting address
SX10504: Programming
SX10504: About water level detection
SX10504: Example program
SX10505: 4 analog out
SX10505: Connecting to your controller
SX10505: Power supply requirements
SX10505: Selecting and setting address
SX10505: Programming
SX10506: Pressure Sensor
SX10506: General
SX10506: Specifications
SX10506: Connecting to your controller
SX10506: Selecting and setting address
SX10506: Usage Notes
SX10506: Programming
SX10507: pH Measurement
SX10507: General
SX10507: Specifications
SX10507: Connecting to your controller
SX10507: Usage Notes
pH measuring analysis
SX10507: pH Demo Software
SX10507 Demo: What You Will Need
SX10507 Demo: Option Links
SX10507 Demo: Connecting Up
SX10507 Demo: Software Operation
SX10507 Demo: Calibration Mode
SX10507 Demo: Calibration Summary
SX10508: Xwire SD Logger
SX10508: Connecting to your controller
SX10508: Power supply requirements
Some common terminology
SX10508: Setting the time and date
SX10508: Inserting and removing the SD card
SX10508: Xwire Logging
SX10508: Serial Logging
SX10508: More on Serial Programming
SX10508: Example Program
SX10509: Ethernet/Internet "SPLat Call Home"
SX10509: General principles
SX10509: Connecting to your controller
SX10509: Power supply requirements
SX10509: Connecting SCH to Ethernet/LAN
SX10509: Configuring your SCH
SX10509: Status
SX10509: Xwire Configuration
SX10509: Server Configuration
SX10509: Network Configuration
SX10509: Time Configuration
SX10509: OTA Configuration
SX10509: Programming the SPLat controller
SX10509: Server
SX10509: Server Xwire data blocks
SX10509: Server example Xwire buffer allocation and configuration
SX10509: Server Commands
SX10509: Server Commands in more detail
SX10509: Date and Time
SX10509: Example Programs
SX10509: Tutorial and online sandbox
Product documentation: Bluetooth adaptors
BT-TTL Bluetooth adaptor
BT-RS232 Bluetooth adaptor
Product documentation: RS485 adaptors
X485: X-Wire to RS485 adaptor for CC18
X485: Installation
X485: Wiring
X485: Notes
XP485: X-Wire to RS485 adaptor
XP485: Installation
PC485: Power supply
XP485: Wiring
XP485: Notes
TL485/MS485: RS485 adaptor for CC16/CC18/MS120/HD8
TL485/MS485: Installation
TL485/MS485: Wiring
MS485: RS485 adaptor for MS120
PC485: RS232 to RS485 adaptor
PC485: Installation
PC485: Power supply
PC485: RS485 wiring
PC485: Line terminating resistor
MB485:
MB485: Installation
MB485: Wiring
Product documentation: I/O adapter boards
RLX8 product documentation
RLX8: Introduction
RLX8: Power requirements
RLX8: Connecting to a SPLat controller
UBCC1030 Connection cable
RLX8: Connecting to MMi99
RLX8: Connecting to OEM32/36
RLX8: Connecting to SL88
RLX8: Output relay information
RLX8: Relay ratings
RLX8: Output connections
Product documentation: Onboard peripherals
Onboard LCD
OBLCD: Introduction
OBLCD: Hardware
OBLCD: Buying an LCD module
OBLCD: Connecting the LCD to the SPLat board
OBLCD: Connecting SPLat supplied LCD module
OBLCD: Contrast adjustment
OBLCD: Power supply
OBLCD: Backlighting
OBLCD: Special characters
OBLCD: Programming
OBLCD: Initializing the LCD
OBLCD_Type tt
OBLCD: Programming the cursor, clearing the screen
OBLCD_SetCur r,c
OBLCD_CurOn
OBLCD_CurOff
OBLCD_CurBlink
OBLCD_Cls
OBLCD_GetCurYX [D>=16]
OBLCD_SetCurYX [D>=16]
OBLCD: Programming text messages
OBLCD_CharX
OBLCD_Text "Message"
OBLCD_NVText nn [D>=15]
OBLCD_SpclChar c
OBLCD: Programming numeric output
OBLCD_UDecDispMVW mm
OBLCD_UDecDispMFW mm
OBLCD_SDecDispMVW mm
OBLCD_SDecDispMFW mm
OBLCD_UDecDispXVW
OBLCD_UDecDispXFW
OBLCD_SDecDispXVW
OBLCD_SDecDispXFW
OBLCD_HexDispX
OBLCD_fDispW f,p
OBLCD: Programming bar graphs
OBLCD_HGraph [D>=18]
OBLCD: Programming housekeeping functions
OBLCD_GoIfBusy line
OBLCD_GoIfIdle line
OBLCD_RUT
OBLCD: Timing considerations
OBLCD: Examples
Example: Simple text display with OBLCD
Example: Integer count display with OBLCD
Example: Temperature readout with limits with OBLCD
Example: A simple menu system with OBLCD
Example: LCD backlight auto-off timers
OBLCD: ModBus interaction
OBLCD: Support in SPLat/PC
Onboard counter type A
OBCA: Introduction
OBCA: Hardware
OBCA: Theory of operation
OBCA: Programming
OBCA: Initialization
OBCA_Mode m
OBCA_Clr
OBCA: Testing for readings
OBCA_GoIfRdg line
OBCA_GoIfNoRdg line
OBCA_WaitRdg
OBCA_GoSubIfRdg line
OBCA_RetIfNoRdg
OBCA: Getting readings
OBCA_fRead
OBCA_fRdClr
OBCA: Examples
Example: Tachometer using OBCA
OnBoard Counter type B
OBCB Introduction
OBCB Hardware
OBCB Theory of operation
OBCB Programming
Examples: OBCB
Example: OBCB counting off events
Example: OBCB frequency counting
Example: OBCB frequency measurement with long time base
Onboard Quadrature Counter
OBQC: Introduction
OBQC: Hardware
OBQC: Theory of operation
OBQC: Programming
System Calls (The CPU device)
The CPU device
CPU: Firmware revision
CPU: Dialect
CPU: Board type
CPU: I/O configuration
CPU: Subroutine nesting depth
CPU: Runtime error codes
CPU: Processor reset flags
CPU: DTR input
CPU: Miscellaneous resources (D>=16)
CPU: RTS output
CPU: Altering SuperTimer 10mS timebase [D>=20]
CPU: Processor temperature
CPU: Unique ID
Programming reference
Instructions arranged by function
32bit Controller Enhancements
Analog instructions
AnIn#
AnOut#
fAnIn c+ [D>=18]
fAnOut c+ [D>=18]
Arithmetic (8 bit integer) instructions
ADD [D>=23]
SBC [D>=23]
SUB [D>=23]
ADC [D>=23]
TestXeqY [D>=28]
TestXgeY [D>=28]
TestXgtY [D>=28]
TestXleY [D>=28]
TestXltY [D>=28]
TestXneY [D>=28]
Callback instructions
Suspend mm*+ [D>=12/15]
Resume mm*+ [D>=12/15]
Counting (and related) instructions
iiChrPrintX dest# [D>=23]
DecI
DecM mm+
DecX
DecMGoIfNZ mm*+,LLLL
DecMRetIfNZ mm+
DecMRetIfZ mm+
DMGNZ mm*+,LLLL
fDec
fInc
iifPrintWVW dest#,f,p [D>=23]
iifPrintWFW dest#,f,p [D>=23]
GetCount7 [D= 4 to 15]
iiHexPrintX dest# [D>=23]
IncI
IncM mm+
IncX
OBCA_fRead
OBCA_GoIfNoRdg line
OBCA_GoIfRdg line
OBCA_Mode m
OBCA_RetIfNoRdg
OBCA_WaitRdg
OBCB_GoIfA LLLL
OBCB_GoIfB LLLL [D>=19]
OBCB_fRdClr c+ [D>=19]
OBCB_fRead c+ [D>=19]
OBCB_Start c+ [D>=19]
OBCB_StartA c [D>=19]
OBCB_Stop c+ [D>=19]
OBCB_StopB c+ [D>=19]
OBQC_Clr c [D>=16]
OBQC_fGet c [D>=16]
OBQC_fSet c [D>=16]
OBQC_Status c [D>=17]
iiPrintFill dest#,count,value [D>=23]
iisPrintXFW dest# [D>=23]
iisPrintXVW dest# [D>=23]
iiuPrintXFW dest# [D>=23]
iiuPrintXVW dest# [D>=23]
SetCount7 [D= 4 to 15] DEPRECATED
Communications instructions
# Open_Serial hash command
# ModBusMaster
# ModBusSlave
# Port(p) hash function
# SPLatLink(BaudRate) hash function
# User(BaudRate, Bits, Parity) hash function
MODBUS Instructions
ModBus: Resource mapping
ComDevAddr [D>=17]
aComDevAddr pp [D>=29]
ComHaltScript [D>=17]
ComResumeScript [D>=17]
ComRunScript pppp [D>=17]
ModBus Master control script commands
MODBUS Number Format
ReadCoil(s) - 1, SlaveAddr, CoilAddr16, ItemCount, SPAddr16
ReadInputs - 2, SlaveAddr, InAddr16, ItemCount, SPAddr16
ReadHregs - 3, SlaveAddr, RegAddr16, ItemCount, SPAddr16, NumFormat
ReadInRegs - 4, SlaveAddr, InRegAddr16, ItemCount, SPAddr16,NumFormat
ForceCoil - 5, SlaveAddr, CoilAddr16, SPAddr16
PresetHreg - 6, SlaveAddr, RegAddr16, SPAddr16, SPMode
ForceMultCoils - 15, SlaveAddr, CoilAddr16, ItemCount, SPAddr16
PresetMultRegs - 16, SlaveAddr, RegAddr16, ItemCount, SPAddr16, SPMode
GoTo - 128, NVPtr16
Stop - 129
Delay - 130, Time
Default Serial Port
Com_Flags [D>=23]
ComRx_BufLen [D>=23]
ComRx_DelXChars [D>=23]
ComRx_FindXInBuf (X) [D>=23]
ComRx_fGetNum fw [D>=26]
ComRx_GetHex [D>=23]
ComRx_Peek (X) [D>=23]
ComRx_ReadOne [D>=23]
ComTx_Space [D>=23]
ComRx_StrFind c [D>=27]
ComRx_StrFind2 c [D>=29]
ComRx_Trim (X) [D>=23]
ComTestStartTimer [D>=17]
ComSetCCB pppp [D>=17]
Any Serial Port
aCom_Flags pp [D>=29]
aComRx_BufLen pp [D>=29]
aComRx_DelXChars pp [D>=29]
aComRx_FindXInBuf (X) [D>=23]
aComRx_fGetNum pp,fw [D>=29]
aComRx_GetHex pp [D>=29]
aComRx_Peek pp [D>=29]
aComRx_ReadOne pp [D>=29]
aComRx_StrFind pp,c [D>=28]
aComRx_StrFind2 pp,c [D>=29]
aComRx_Trim pp [D>=29]
aComTx_Space pp [D>=29]
aComSetCCB pp,nnnn [D>=29]
iFindXInBuf bb*,nn [D>=28]
iiChrPrintX dest# [D>=23]
iifGetNum bb#,nn,fw [D>=28]
iifPrintWFW dest#,f,p [D>=23]
iifPrintWVW dest#,f,p [D>=23]
iiGetHex bb#,nn [D>=28]
iiHexPrintX dest# [D>=23]
iiPrintFill dest#,count,value [D>=23]
iiPrintNVText dest# [D>=27]
iiPrintText dest#,text-string [D >= 23]
iisPrintXFW dest# [D>=23]
iiStrFind bb#,nn,c [D>=28]
iiStrFind2 bb#,nn,c [D>=29]
iiuPrintXFW dest# [D>=23]
iiuPrintXVW dest# [D>=23]
iisPrintXVW dest# [D>=23]
Floating point instructions
aComRx_fGetNum pp,fw [D>=29]
ComRx_fGetNum fw [D>=26]
fAbs
fAdd
fAnIn c+ [D>=18]
fAnOut c+ [D>=18]
fCompareR
fDec
fDiv
fGetTimer t
fGoIfNeg LLLL
fGoIfNZ LLLL
fGoIfPos LLLL
fGoIfWGEQ LLLL [D>=23]
fGoIfWGTQ LLLL [D>=23]
fGoIfWLEQ LLLL [D>=23]
fGoIfWLTQ LLLL [D>=23]
fGoIfZ LLLL
fIEEEtoWR [D>=21]
fInc
fix
FixToMem16S mm* [D>=21]
FixToMem16U mm+ [D>=21]
fLoadQ ffff
fLoadW ffff
float
FloatMem16S mm* [D>=21]
FloatMem16U mm+ [D>=21]
fMul
fNeg
fPulse0 [D>=19]
fRecallQ mm*+
fRecallW mm*+
fSetTimer t
fSign
fStore mm*+
fSTSinceMark [D>=22]
fSTTimeSince aa+ [D>=16]
fSub
fSwap
fTest
fTestWeqQ [D>=24]
fTestWeqZ [D>=25]
fTestWgeQ [D>=25]
fTestWgeZ [D>=25]
fTestWgtQ [D>=25]
fTestWleQ [D>=25]
fTestWltQ [D>=25]
fTestWltZ [D>=25]
fTestWneQ [D>=25]
fTestWneZ [D>=25]
fWtoQ
fWtoIEEER [D>=21]
iifGetNum bb#,nn,fw [D>=28]
iifPrintWFW dest#,f,p [D>=23]
iifPrintWVW dest#,f,p [D>=23]
NVfGetEndW [D>=15]
NVfGetPtrW [D>=15]
NVfGetRecNumW [D>=15]
NVfPutPtrW [D>=15]
NVfPutRecNumW [D>=15]
NVfReadQ nn*+ [D>=15]
NVfReadW nn*+ [D>=15]
NVfWriteW nn*+ [D>=15]
OBCA_fRead
Result codes for fAdd, fSub, fMul, fDiv
Result codes for fCompareR
Result codes for fInc, fDec
Result codes for fix
Result codes for fSetTimer
Result codes for fTest
GoTo, GoSub and related instructions
Branch
BranchJ [D>=16]
BranchM mm+
BranchR
DecMGoIfNZ mm*+,LLLL
DecMRetIfNZ mm+
DecMRetIfZ mm+
fGoIfNeg LLLL
fGoIfNZ LLLL
fGoIfPos LLLL
fGoIfWGEQ LLLL [D>=23]
fGoIfWGTQ LLLL [D>=23]
fGoIfWLEQ LLLL [D>=23]
fGoIfWLTQ LLLL [D>=23]
fGoIfZ LLLL
GoIfF LLLL
GoIfInK ii+,LLLL
GoIfInOff ii+,LLLL
GoIfInOn ii+,LLLL
GoIfINZ LLLL
GoIfIZ LLLL
GoIfMEQ mm+,nn,LLLL
GoIfMGE mm+,nn,LLLL
GoIfMGT mm+,nn,LLLL
GoIfMLE mm+,nn,LLLL
GoIfMLT mm+,nn,LLLL
GoIfMNE mm+,nn,LLLL
GoIfMNZ mm+,LLLL
GoIfMZ mm+,LLLL
GoIfNZ LLLL
GoIfRTCEvent e+,LLLL [D>=16]
GoIfSF ss,bb+,LLLL [D>=12]
GoIfSim LLLL
GoIfST ss,bb+,LLLL [D>=12]
GoIfT LLLL
GoIfUF n,m,line
GoIfUT n,m,line
GoIfXEQ nn,LLLL
GoIfXGE nn,LLLL
GoIfXGT nn,LLLL
GoIfXLE nn,LLLL
GoIfXLT nn,LLLL
GoIfXNE nn,LLLL
GoIfZ LLLL
GoSub LLLL
GoSubIfF LLLL
GoSubIfMNZ mm+,LLLL
GoSubIfMZ mm+,LLLL
GoSubIfNZ LLLL
GoSubIfST ss,bb+,LLLL [D>=12]
GoSubIfT LLLL
GoSubIfXEQ nn,LLLL
GoSubIfXGE nn,LLLL
GoSubIfXGT nn,LLLL
GoSubIfXLE nn,LLLL
GoSubIfXLT nn,LLLL
GoSubIfXNE nn,LLLL
GoSubIfZ LLLL
GoTo LLLL
OBCA_GoIfNoRdg line
OBCA_GoIfRdg line
OBCA_GoSubIfRdg line
OBLCD_GoIfBusy line
OBLCD_GoIfIdle line
RetIfF
RetIfMNZ mm+
RetIfMZ mm+
RetIfNZ
RetIfT
RetIfZ
Return
Suspend mm*+ [D>=12/15]
Target LLLL
# Hash commands and functions
# HMI Controller Instructions
HMI - Code Examples
HMI - Simple Example
HMI - Button and Output Examples
HMI - Bounds Slider
HMI - Long Press Button
UI Framework
Colours
Formatting functions
Byte formatting function b(Source {, Format})
Floating point formatting function f()
Semaphore formatting function s(Source, TrueOutput, FalseOutput)
NVEM string formatting function nz({Ptr}{,Item})
Positioning
Utilities
ui_utils.spt
Z-Index
# ButtonEvent2()
# Cls()
# ConnectEvent()
# CursorRel()
# DrawImage()
# FreezeScreen()
# HBar()
# HideAllButtons()
# Print()
# PrintOBLCD()
# Reset()
# SetBacklight()
# SetBounds()
# SetColors()
# SetCursor()
# SetFont()
# Include hash command
# File(FileName) hash function
# Open_Serial hash command
# ModBusMaster
# ModBusSlave
# Port(p) hash function
# SPLatLink(BaudRate) hash function
# User(BaudRate, Bits, Parity) hash function
# Thermistor hash command
# Display(Bits) hash function
# Feed(Vfeed, Vfs, Rfeed) hash function
# Params(R25, Beta) hash function
# Order(o) hash function
# RangeC(Tmin, Tmax) hash function
# Theta(Rt) hash function
#IF, #ELSEIF, #ELSE, #ENDIF (Conditional code translation)
Index register instructions
ClrS ss+,bb* [D>=12]
DecI
fRecallQ mm*+
fRecallW mm*+
fStore mm*+
GoIfINZ LLLL
GoIfIZ LLLL
iiChrPrintX dest# [D>=23]
iifPrintWFW dest#,f,p [D>=23]
iifPrintWVW dest#,f,p [D>=23]
iiHexPrintX dest# [D>=23]
iiPrintFill dest#,count,value [D>=23]
iiPrintNVText dest# [D>=27]
iiPrintText dest#,text-string [D >= 23]
iisPrintXFW dest# [D>=23]
iisPrintXVW dest# [D>=23]
iiuPrintXFW dest# [D>=23]
iiuPrintXVW dest# [D>=23]
IncI
Input ii*+
InputF ii*+
InputK ii*+
InputO ii*+
ItoX
LoadI nn
Off oo*+
On oo*+
Output oo*+
NotS ss+,bb* [D>=12]
NVfReadQ nn*+ [D>=15]
NVfReadW nn*+ [D>=15]
NVfWriteW nn*+ [D>=15]
NVPopByte nn*+ [D>=15]
NVPushByte nn*+ [D>=15]
Recall mm*+
RecallS ss+,bb* [D>=12]
SetS ss+,bb* [D>=12]
ShadowRead mm*+,cc
ShadowWrite mm*+,cc
Store mm*+
StoreS ss+,bb* [D>=12]
XtoI
Input and Output instructions (digital)
Blink oo+
BlinkM oo+
BlinkMask mm
fPulse0 [D>=19]
GoIfInK ii+,LLLL
GoIfInOff ii+,LLLL
Input ii*+
InputF ii*+
InputFM ii+
InputK ii*+
InputM ii+
InputMK ii+
InputO ii*+
InputOM ii+ [D>=13]
InputR ii+,tt
KBeep [D>=16]
KBeepOff
KBeepOn
Off oo*+
On oo*+
Output oo*+
OutputB oo+
OutputM oo+
ResetK
WaitOff ii+
WaitOffT ii+,tttt
WaitOnK ii+
WaitOnKT ii+,tttt
WaitOnT ii+,tttt
Logical instructions
And
AndM
BlinkMask mm
InputFM ii+
Not
NotM
Or
OrM
OutputM oo+
RolM
RorM
Xor
XorM
Memory instructions
BranchM mm+
iiChrPrintX dest# [D>=23]
ClrS ss+,bb* [D>=12]
ComRx_DelXChars [D>=23]
ComRx_GetHex [D>=23]
ComRx_ReadOne [D>=23]
DecM mm+
DecMGoIfNZ mm*+,LLLL
DecMRetIfNZ mm+
DecMRetIfZ mm+
DMGNZ mm*+,LLLL
iiChrPrintX dest# [D>=23]
iifPrintWFW dest#,f,p [D>=23]
iifPrintWVW dest#,f,p [D>=23]
iiHexPrintX dest# [D>=23]
iiPrintFill dest#,count,value [D>=23]
iiPrintNVText dest# [D>=27]
iiPrintText dest#,text-string [D >= 23]
iisPrintXFW dest# [D>=23]
iisPrintXVW dest# [D>=23]
iiuPrintXFW dest# [D>=23]
iiuPrintXVW dest# [D>=23]
fRecallQ mm*+
fRecallW mm*+
GoIfMEQ mm+,nn,LLLL
GoIfMGE mm+,nn,LLLL
GoIfMGT mm+,nn,LLLL
GoIfMLE mm+,nn,LLLL
GoIfMLT mm+,nn,LLLL
GoIfMNE mm+,nn,LLLL
GoIfMNZ mm+,LLLL
GoIfMZ mm+,LLLL
GoIfST ss,bb+,LLLL [D>=12]
GoSubIfMNZ mm+,LLLL
GoSubIfMZ mm+,LLLL
GoSubIfSF ss,bb+,LLLL [D>=12]
GoSubIfST ss,bb+,LLLL [D>=12]
IncM mm+
NotS ss+,bb* [D>=12]
PermRecall [D>=2]
PermStore [D>=2]
Recall mm*+
RecallS ss+,bb* [D>=12]
RetIfMNZ mm+
RetIfMZ mm+
RetIfST ss,bb+ [D>=12]
SetMem mm*+,nn
SetS ss+,bb* [D>=12]
ShadowClear mm*+,cc
ShadowWrite mm*+,cc
StoreS ss+,bb* [D>=12]
MultiTrack instructions
BranchJ [D>=16]
ClrInstCount [D>=18]
fSTTimeSince aa+ [D>=16]
GetTick100 [D>=12]
KillTask [D>=16]
LaunchTask LLLL,jj [D>=16]
LaunchTaskJ LLLL [D>=16]
LaunchTaskX LLLL [D>=16]
LoopIfTiming tttttt,LLLL [D>=16]
MarkTime [D>=16]
RunTasks [D>=16]
RunTasksForever [D>=16]
STScale ss [D>=16]
STStart aa+ [D>=16]
STTest aa+,tttttt [D>=16]
WaitForRTCEvent e+ [D>=16]
WaitForSF ss,bb [D>=16]
WaitForST ss,bb [D>=16]
YieldTask [D>=16]
Non-volatile memory
NV0Byte Directive [D>=15]
NV0fNum Directive [D>=15]
NV0Ptr Directive [D>=15]
NV0Space Directive [D>=15]
NVAddPtr nn [D>=15]
NVAdvPtr [D>=15]
NVDecRecNum [D>=15]
NVEM0 Directive [D>=15]
NVfGetEndW [D>=15]
NVfGetPtrW [D>=15]
NVfGetRecNumW [D>=15]
NVfPutPtrW [D>=15]
NVfPutRecNumW [D>=15]
NVfReadQ nn*+ [D>=15]
NVfReadW nn*+ [D>=15]
NVfWriteW nn*+ [D>=15]
NVIncRecNum [D>=15]
NVPopByte nn*+ [D>=15]
NVPopPage [D>=15]
NVPopRecLen [D>=15]
NVPopRecNum [D>=15]
NVPushByte nn*+ [D>=15]
NVPushPage [D>=15]
NVPushRecLen [D>=15]
NVPushRecNum [D>=15]
NVReadRec mm [D>=15]
NVReadToPtr nn [D>=15]
NVSetPage nn [D>=15]
NVSetPtr pppp [D>=15]
NVSetRecLen nn [D>=15]
NVSetRecNum nnnn [D>=15]
NVSubPtr nn [D>=15]
NVtoUV nn,u [D>=15]
NVWriteRec mm [D>=15]
OBLCD_NVText nn [D>=15]
PermRecall [D>=2]
PermStore [D>=2]
ShadowClear mm*+,cc
ShadowRead mm*+,cc
ShadowWrite mm*+,cc
Number comparison and testing instructions
Comparison and testing for floating point
fCompareR
fGoIfNeg LLLL
fGoIfNZ LLLL
fGoIfPos LLLL
fGoIfWGEQ LLLL [D>=23]
fGoIfWGTQ LLLL [D>=23]
fGoIfWLEQ LLLL [D>=23]
fGoIfWLTQ LLLL [D>=23]
fGoIfZ LLLL
fTest
fTestWeqQ [D>=24]
fTestWeqZ [D>=25]
fTestWgeQ [D>=25]
fTestWgeZ [D>=25]
fTestWgtQ [D>=25]
fTestWleQ [D>=25]
fTestWltQ [D>=25]
fTestWltZ [D>=25]
fTestWneQ [D>=25]
fTestWneZ [D>=25]
Result codes for fCompareR
Comparison and testing for byte values
Branch
BranchM mm+
BranchR
Compare
CompareR
DecMGoIfNZ mm*+,LLLL
DecMRetIfNZ mm+
DecMRetIfZ mm+
DMGNZ mm*+,LLLL
GoIfINZ LLLL
GoIfIZ LLLL
GoIfMEQ mm+,nn,LLLL
GoIfMGE mm+,nn,LLLL
GoIfMGT mm+,nn,LLLL
GoIfMLE mm+,nn,LLLL
GoIfMLT mm+,nn,LLLL
GoIfMNE mm+,nn,LLLL
GoIfMNZ mm+,LLLL
GoIfMZ mm+,LLLL
GoIfNZ LLLL
GoIfXEQ nn,LLLL
GoIfXGE nn,LLLL
GoIfXGT nn,LLLL
GoIfXLE nn,LLLL
GoIfXLT nn,LLLL
GoIfXNE nn,LLLL
GoIfZ LLLL
GoSubIfMNZ mm+,LLLL
GoSubIfMZ mm+,LLLL
GoSubIfNZ LLLL
GoSubIfXEQ nn,LLLL
GoSubIfXGE nn,LLLL
GoSubIfXGT nn,LLLL
GoSubIfXLE nn,LLLL
GoSubIfXLT nn,LLLL
GoSubIfXNE nn,LLLL
GoSubIfZ LLLL
TestXeqY [D>=28]
TestXgeY [D>=28]
TestXgtY [D>=28]
TestXleY [D>=28]
TestXltY [D>=28]
TestXneY [D>=28]
Result codes for CompareR
Onboard LCD (OBLCD) instructions
Xwire OBLCD
# PrintOBLCD()
OBLCD: Special characters
OBLCD_CharX
OBLCD_Cls
OBLCD_CurBlink
OBLCD_CurOff
OBLCD_CurOn
OBLCD_Date [D>=16]
OBLCD_DM [D>=16]
OBLCD_Dim Lo,Hi,Delay
OBLCD_fDispW f,p
OBLCD_GetCurYX [D>=16]
OBLCD_GoIfBusy line
OBLCD_GCRAM pppp
OBLCD_GoIfIdle line
OBLCD_HexDispX
OBLCD_HHMM [D>=16]
OBLCD_HGraph [D>=18]
OBLCD_HHMMSS [D>=16]
OBLCD_NVText nn [D>=15]
OBLCD_RUT
OBLCD_SDecDispMFW mm
OBLCD_SDecDispMVW mm
OBLCD_SDecDispXFW
OBLCD_SDecDispXVW
OBLCD_SetCur r,c
OBLCD_SetCurYX [D>=16]
OBLCD_SpclChar c
OBLCD_Text "Message"
OBLCD_Type tt
OBLCD_UDecDispMFW mm
OBLCD_UDecDispMVW mm
OBLCD_UDecDispXFW
OBLCD_UDecDispXVW
Onboard counter A (OBCA) Instructions
Onboard counter type A
OBCA: Introduction
OBCA: Hardware
OBCA: Theory of operation
OBCA: Programming
OBCA: Initialization
OBCA_Mode m
OBCA_Clr
OBCA: Testing for readings
OBCA_GoIfRdg line
OBCA_GoIfNoRdg line
OBCA_WaitRdg
OBCA_GoSubIfRdg line
OBCA_RetIfNoRdg
OBCA: Getting readings
OBCA_fRead
OBCA_fRdClr
OBCA: Examples
Example: Tachometer using OBCA
OBCA_Clr
OBCA_fRead
OBCA_fRdClr
OBCA_GoIfNoRdg line
OBCA_GoIfRdg line
OBCA_GoSubIfRdg line
OBCA_Mode m
OBCA_RetIfNoRdg
OBCA_WaitRdg
Onboard counter B (OBCB) instructions
OnBoard Counter type B
OBCB Introduction
OBCB Hardware
OBCB Theory of operation
OBCB Programming
Examples: OBCB
Example: OBCB counting off events
Example: OBCB frequency counting
Example: OBCB frequency measurement with long time base
OBCB_GoIfA LLLL
OBCB_GoIfB LLLL [D>=19]
OBCB_fRdClr c+ [D>=19]
OBCB_fRead c+ [D>=19]
OBCB_Start c+ [D>=19]
OBCB_StartA c [D>=19]
OBCB_Stop c+ [D>=19]
OBCB_StopB c+ [D>=19]
Onboard quadrature counter
Onboard Quadrature Counter
OBQC: Introduction
OBQC: Hardware
OBQC: Theory of operation
OBQC: Programming
OBQC_Clr c [D>=16]
OBQC_fGet c [D>=16]
OBQC_fSet c [D>=16]
OBQC_Status c [D>=17]
RealTime Clock
GoIfRTCEvent e+,LLLL [D>=16]
OBLCD_Date [D>=16]
OBLCD_DM [D>=16]
OBLCD_HHMM [D>=16]
OBLCD_HHMMSS [D>=16]
RTCDecDN [D>=25]
RTCDecHH [D>=25]
RTCDecMM [D>=25]
RTCDecSS [D>=25]
RTCClrDM [D>=16]
RTCDateToUV [D>=16]
RTCDMToUV [D>=16]
RTCFailFlag [D>=20]
RTCHHMMSSToUV [D>=16]
RTCHHMMToUV [D>=16]
RTCIncDN [D>=16]
RTCIncHH [D>=16]
RTCIncMM [D>=16]
RTCIncSS [D>=16]
RTCNotDM [D>=16]
RTCPopDM [D>=16]
RTCPopDN [D>=16]
RTCPopHH [D>=16]
RTCPopMM [D>=16]
RTCPopSS [D>=16]
RTCPushDM [D>=16]
RTCPushDN [D>=16]
RTCPushHH [D>=16]
RTCPushMM [D>=16]
RTCPushSS [D>=16]
RTCReadDate [D>=16]
RTCReadEvent e+ [D>=16]
RTCReadTime [D>=16]
RTCSetDM [D>=16]
RTCTestEvent e+ [D>=16]
RTCWriteDate [D>=16]
RTCWriteDN [D>=16]
RTCWriteEvent e+ [D>=16]
RTCWriteTime [D>=16]
WaitForRTCEvent e+ [D>=16]
Semaphore instructions
GoIfSF ss,bb+,LLLL [D>=12]
GoIfST ss,bb+,LLLL [D>=12]
GoSubIfSF ss,bb+,LLLL [D>=12]
GoSubIfST ss,bb+,LLLL [D>=12]
NotS ss+,bb* [D>=12]
RecallS ss+,bb* [D>=12]
RetIfST ss,bb+ [D>=12]
RetIfSF ss,bb+ [D>=12]
SetS ss+,bb* [D>=12]
StoreS ss+,bb* [D>=12]
WaitForSF ss,bb [D>=16]
WaitForST ss,bb [D>=16]
Stack instructions
LoadX nn
Pop
PopU n
PopV
Push
PushU n
PushV
Recall mm*+
RecallS ss+,bb* [D>=12]
RTCPopDM [D>=16]
RTCPopDN [D>=16]
RTCPopHH [D>=16]
RTCPopMM [D>=16]
RTCPopSS [D>=16]
RTCPushDM [D>=16]
RTCPushDN [D>=16]
RTCPushHH [D>=16]
RTCPushMM [D>=16]
RTCPushSS [D>=16]
RtoX [D>=23]
Store mm*+
StoreS ss+,bb* [D>=12]
Swap
SPLat expansion framework generic instructions
ClrU
fixToU n [D>=14]
floatFromU n [D>=14]
GoIfUF n,m,line
GoIfUT n,m,line
MemToUV m,n
PopU n
PopV
PushU n
PushV
QtoU n
RTCDateToUV [D>=16]
RTCDMToUV [D>=16]
RTCHHMMSSToUV [D>=16]
RTCHHMMToUV [D>=16]
SetU n,i
SetV i
SPiceConfigU
SPxChIn cc,aaaa [In]
SPxChOut cc,aaaa [Out]
SPxCmd0 cc,aaaa [Out]
SPxCmd1 cc,aaaa [Out]
SPxCmd2 cc,aaaa [Out]
SPxCmd4 cc,aaaa [Out]
SPxMode m
SPxPoll1 cc,aaaa [In]
SPxPoll2 cc,aaaa [In]
SPxPoll4 cc,aaaa [In]
SPxTxfrU p
StringToUV n,"String"
UtoQ n
UtoW n
UVToMem n,mm
UVtoNV nn,u [D>=15]
WtoU n
System Calls (The CPU device)
The CPU device
CPU: Firmware revision
CPU: Dialect
CPU: Board type
CPU: I/O configuration
CPU: Subroutine nesting depth
CPU: Runtime error codes
CPU: Processor reset flags
CPU: DTR input
CPU: Miscellaneous resources (D>=16)
CPU: RTS output
CPU: Altering SuperTimer 10mS timebase [D>=20]
CPU: Processor temperature
CPU: Unique ID
Timing instructions
CPU: Altering SuperTimer 10mS timebase [D>=20]
Countdown Timers
fGetTimer t
fSetTimer t
SetTimer t,dddd
Start t
Stop t
STScale ss [D>=16]
Test t
Elapsed Timers
System Timer
fSTTimeSince aa+ [D>=16]
STStart aa+ [D>=16]
STTest aa+,tttttt [D>=16]
Task Timers
fSTSinceMark [D>=22]
STScale ss [D>=16]
Blink oo+
fPulse0 [D>=19]
GetTick100 [D>=12]
Pause tttt
Pulse0 tt [D= 5 to 15]
WaitOffT ii+,tttt
WaitOnKT ii+,tttt
WaitOnT ii+,tttt
Xwire instructions
SEXI: Serial I/O Expansion via Xwire Interface
Xwire OBLCD
iFindXInBuf bb*,nn [D>=28]
iiChrPrintX dest# [D>=23]
iiGetHex bb#,nn [D>=28]
iifGetNum bb#,nn,fw [D>=28]
iifPrintWFW dest#,f,p [D>=23]
iifPrintWVW dest#,f,p [D>=23]
iiHexPrintX dest# [D>=23]
iiPrintFill dest#,count,value [D>=23]
iiPrintText dest#,text-string [D >= 23]
iisPrintXVW dest# [D>=23]
iiuPrintXFW dest# [D>=23]
iiuPrintXVW dest# [D>=23]
iiStrFind bb#,nn,c [D>=28]
XwireGetComErr [D>=24]
XwireGetErrCount [D>=20]
XwireGetJumpers [D>=20]
XwireGetPollCntr [D>=23]
XwireIdlePoll [D>=23]
XwireMaster pppp [D>=20]
XwirePhys nn [D>=28]
XwireSetAddr [D>=20]
XwireSlave pppp [D>=20]
XwireStop [D>=23]
WarmBoot [D .= 20]
Active Templates - library modules on steroids
SX10500 template
RTD template
Directives
defADDR Directive
defBLOCK directive
defBYTE Directive
defFLOAT Directive
defLONG Directive
defSEM Directive
defTIME24 Directive
defWORD Directive
EQU Directive
fEQU Directive
iEQU Directive
NV0Byte Directive [D>=15]
NV0fNum Directive [D>=15]
NV0Ptr Directive [D>=15]
NV0Space Directive [D>=15]
NVEM0 Directive [D>=15]
mEQU Directive
oEQU Directive
sEQU Directive [D>=12]
#EQU directive
#IF, #ELSEIF, #ELSE, #ENDIF (Conditional code translation)
# Include hash command
# File(FileName) hash function
Precodes
NoJ: Precode [D>=16]
Result codes
Result codes for CompareR
Result codes for ComRx_fGetNum
Result codes for fAdd, fSub, fMul, fDiv
Result codes for fCompareR
Result codes for fInc, fDec
Result codes for fix
Result codes for fixToU
Result codes for floatFromU
Result codes for fSetTimer
Result codes for fTest
Communication Control Block elements
Protocol
Device address
Character profile
Baud rate
Message gap x10mS
Query timeout x10mS
Query attempts
SPLat/PC programming software
SPLat/PC: Troubleshooting
SPLat/PC: Onboard quadrature counter (OBQC) support
SPLat/PC: RAM allocation schemes
SPLat/PC: Manual RAM allocation
SPLat/PC: Automatic RAM allocation
RAM Allocation: Ground rules
Auto-Allocation: When would I use it?
Auto-Allocation: When would I not use it?
Auto-Allocation: Semaphores
SPLat/PC: The preprocessor
SPLat/PC: Builder
Builder: The basic idea
Builder: How you control the result, in brief
Builder: Discarding segments
Builder: Conditional segments ;<=IF
Builder: ONEONLY segment qualifier
Builder: ONCEINLINE segment qualifier
Builder: Summary of segment qualifiers
Builder: Standard segment names
Builder: Invoking it
Serial communications simulation window
Terminal (for serial comms testing)
SPLat/PC Revision history
Custom SPLat
Custom SPLat: How it gives you an edge
Custom SPLat: What makes SPLat unique?
Custom SPLat: Engineering Costs (NRE)
Custom SPLat: Production costs
Custom SPLat: The development process
Custom SPLat: The specification and your needs
Custom SPLat: Prototypes
Custom SPLat: Integration
Custom SPLat: Programming
Custom SPLat: Responsibilities and warranties
Custom SPLat: Agency approvals
Custom SPLat: How much will it cost?
Custom SPLat: How to get started
Custom SPLat: Add some SPice
SPLat Circuit Element Library
SCEL: CCS125 125mA current source
SCEL: DFRO1 Mid-rail referred ratiometric output
SCEL: IPO8 isolated potentiometric output
SCEL: TM08 thermistor temperature circuit
SCEL: RTD16 Platinum resistance temperature circuit
Tutorials, application notes and white papers
How SPLat works
How SPLat works: Architecture
How SPLat works: Anatomy
How SPLat works: Programming
How SPLat Works: Programming tools
How SPLat works: FastTrack programming
How SPLat works: Hash commands
How SPLat works: Some history
Tutorial: MultiTrack
MultiTrack (Basic): Quick-start for Dummies
MultiTrack (Basic): The YieldTask instruction
MultiTrack (Basic): How many tasks can I have?
MultiTrack (Intermediate): Synchronizing tasks
MultiTrack (Intermediate): SuperTimers
MultiTrack (Intermediate): Subroutines and registers
MultiTrack (Intermediate): Using the OnBoard LCD
MultiTrack (Advanced): Multiple simultaneous SuperTimers
MultiTrack (Advanced): Measuring elapsed time with a SuperTimer
MultiTrack (Advanced): Speeding up SuperTimers for debugging
MultiTrack (Advanced): Changing the 10mS time base
MultiTrack (Advanced): Accuracy of SuperTimers
MultiTrack (Advanced): Transient tasks
MultiTrack (Advanced): Multi-channel operations
Multi-channel MultiTrack: Suppressing J
Multi-channel MultiTrack: RAM addressing with J
Multi-channel MultiTrack: Semaphore addressing with J and I
Multi-channel MultiTrack: Making I behave like J
Multi-channel MultiTrack: BranchJ
Multi-channel MultiTrack: NVEM
MultiTrack (Advanced): Permitting infinite loops.
Serial communications
Serial communications: Port selection
Serial communications: protocol selection
Protocols: The default protocol
Protocols: Communications Control Blocks (CCB)
ModBus
ModBus: Communication Control Blocks
ModBus: Resource mapping
ModBus: Supported functions
ModBus: Slave configuration
ModBus: Master configuration
ModBus master scripts: A worked example
Example: Simple PC<==>SPLat comms using ModBus
User programmable protocol
User programmable protocol: Communication Control Block
User programmable protocol: Sending out messages
User programmable protocol: Receiving messages
RS232 pinouts: a primer
Tutorial: Debugging SPLatWare using serial data
Overview
Setting up the serial port
Serial debugging: Sign posts
Serial debugging: State tracing
Serial debugging: Getting back control (with SPLat/PC)
Serial debugging: Standalone SimpleHMI
Tutorial: SimpleHMI programming of SPLat controllers
SimpleHMI: What it is, has, and does
SimpleHMI: Getting connected with SPLat/PC
SimpleHMI: Hash commands and functions
SimpleHMI: Android, Bluetooth and Connection
SimpleHMI: Introducing Events
SimpleHMI: Displaying text
SimpleHMI: Cursor control
SimpleHMI: Colours
SimpleHMI: User input
SimpleHMI: Speech output
SimpleHMI example: PIN numbers
SimpleHMI: Programming beyond the hash
SimpleHMI: Getting fancy with cursor positioning and screen sizes
SimpleHMI: Screen formats in SPLat/PC
SimpleHMI: Screen relative cursor positioning
SimpleHMI: Specifying the size of buttons and other items
SimpleHMI: The standalone Windows version
SimpleHMI: The logging feature
SimpleHMI: The trace feature
SimpleHMI: Hosts other than SPLat
SimpleHMI low level message codes
Tutorial: SPLat Call Home (SX10509) programming
SPLat Call Home: The sandbox
SPLat Call Home sandbox: Configuring the SX10509
Example: SPLat Call Home sandbox program
Xwire data blocks and NVEM table
Setting the command byte, waiting for an echo
Subroutines for individual Network commands
Display contents of Xwire network Rx data block
The main loop
Test 1: Send empty GET, receive GMT
Test 2: Send two name-value pairs, display the response
Test 3: Retrieve multiple values from the server
Startup code
Exception handling
SPLat Master to Kaspro Demo
Kaspro: What you will need
Kaspro: Programming
Kaspro: Connecting your controller to the Kaspro
Kaspro: Demo program startup
Kaspro: Configure screen
Kaspro: Operation screens
Kaspro: Maintenance screen
Tutorial: Subroutines
Subroutines: What are they?
Subroutines: Why use them?
Subroutines: The subroutine stack
Subroutines: Variations on a theme
Subroutines: Passing arguments and results
Subroutines: Style guide
RealTime Clock
RTC: How it works
RTC: The clock
RTC: Handling days
RTC: Processor registers
RTC: The calendar
RTC: The events
RTC: Backup power
RTC: Memory wear-out
RTC: Programming
RTC: Support in SPLat/PC
RTC: Display instructions
RTC: Using Events
RTC: Example
RTC Instructions
GoIfRTCEvent e+,LLLL [D>=16]
RTCClrDM [D>=16]
RTCDateToUV [D>=16]
RTCDecDN [D>=25]
RTCDMToUV [D>=16]
RTCFailFlag [D>=20]
RTCHHMMSSToUV [D>=16]
RTCHHMMToUV [D>=16]
RTCIncDN [D>=16]
RTCIncHH [D>=16]
RTCIncMM [D>=16]
RTCIncSS [D>=16]
RTCNotDM [D>=16]
RTCPopDM [D>=16]
RTCPopDN [D>=16]
RTCPopHH [D>=16]
RTCPopMM [D>=16]
RTCPopSS [D>=16]
RTCPushDM [D>=16]
RTCPushDN [D>=16]
RTCPushHH [D>=16]
RTCPushMM [D>=16]
RTCPushSS [D>=16]
RTCReadDate [D>=16]
RTCReadEvent e+ [D>=16]
RTCReadTime [D>=16]
RTCSetDM [D>=16]
RTCTestEvent e+ [D>=16]
RTCWriteDate [D>=16]
RTCWriteDN [D>=16]
RTCWriteEvent e+ [D>=16]
RTCWriteTime [D>=16]
WaitForRTCEvent e+ [D>=16]
Tutorial: PID control with SPLat
PI Control - the PID alternative
Tutorial: PID control without the math
PID control: Overview
PID overview: About closed loop control
PID overview: The PIDassist program
PID overview: The overall strategy
PID control: What SPLat can do
PID control: Theory
PID theory: What is PID?
PID theory: Time constants
PID theory: Multiple time constants
PID theory: Asymmetrical time constants
PID theory: Non-linear systems
PID theory: Fixed delays
PID theory: Backlash, stickiness and other nasties
PID theory: The control model
PID control: Using PIDassist
PIDassist: The process simulator
PIDassist: The controller
PIDassist: Display
PIDassist: Modes
PIDassist: Status bar
PIDassist: Code generator
PIDassist: Saving and restoring configurations
PID control: Implementation
PID implementation: characterizing your process
PID characterization: Preparing your process.
PID characterization: Interfacing to the SPLat
PID characterization: Gathering open loop data
PID characterization: Extracting the time constants
PID characterization: Scaling your process
PID implementation: Modeling your process (open loop)
PID implementation: Tuning
PID implementation: Interactive control
PID control: SPLat programming
Tutorial: Semaphores
Semaphores: The quick and easy way
Semaphores: Simplified addressing rules
Semaphores: Bits and Bytes
Semaphores: Programming examples
Example (Basic): Setting and testing semaphores
Example (Intermediate): Combining semaphores (Boolean processing)
Example (Advanced): Using semaphores to latch inputs
Example (Advanced): Combining semaphores and Branch instructions
Example (Advanced): Indexing semaphores
Tutorial: Using SPiceX for large I/O counts
SPiceX: Basic principles
SPiceX: Initialization
SPiceX: Interaction with normal I/O updates
SPiceX: Interaction with SPLat/PC
SPiceX: Input and output mapping
SPiceX: Programming examples
Example: Identifying SPiceX outputs
Example: Identifying SPiceX inputs
Example: SPiceX and ModBus
Tutorial: Thermistor temperature measurement
Thermistors: Overview, theory
Thermistors: Using the supplied spreadsheets
Thermistors: Introduction to spreadsheet
Thermistors: Setting the temperature range
Thermistors: Specifying the thermistor
Thermistors: Selecting miscellaneous parameters
Thermistors: Selecting drive voltage and resistance
Thermistors: Fine tuning
Thermistors: Evaluating the results
Thermistors: Extracting polynomial coefficients
Thermistors: Generating the SPLat code
Thermistors: A worked example
Example: Simple temperature threshold with thermistor
The SPLat Expansion Framework
Introduction
The SPLat expansion framework
Expansion connector
Summary of expansion schemes
Touch of SPice
Tiny Serial Peripheral (TSP) interface
Xwire
SPiceX
XPice
External SPx peripherals
Onboard SPx peripherals
Virtual SPx peripherals
UV SPice
Power supplies
SPx register model
SPx communications instructions
SPxCmd0 cc,aaaa [Out]
SPxCmd1 cc,aaaa [Out]
SPxCmd2 cc,aaaa [Out]
SPxCmd4 cc,aaaa [Out]
SPxChOut cc,aaaa [Out]
SPxPoll1 cc,aaaa [In]
SPxPoll2 cc,aaaa [In]
SPxPoll4 cc,aaaa [In]
SPxChIn cc,aaaa [In]
Error handling in SPx communications instructions
UV transfer instructions
ClrU
PushU n
PopU n
PushV
PopV
WtoU n
UtoW n
UtoQ n
QtoU n
SetV i
SetU n,i
StringToUV n,"String"
MemToUV m,n
UVToMem n,mm
GoIfUT n,m,line
GoIfUF n,m,line
SPiceX instructions
SPxMode m
SPxTxfrU p
SPice configuration instruction
Expansion support in SPLat/PC V6
UV simulation window in SPLat/PC 6.9
Onboard LCD programming
MMi99 SPice support in SPLat/PC 6.9
Xwire
Xwire: Introduction
Xwire: Hardware requirements & wiring
Xwire: Programming
Xwire: Instruction summary
Xwire: Master configuration
Xwire: Slave configuration
Example: Simple I/O expansion using Xwire
Xwire: Addressing
Xwire: Some hints and ideas
Xwire: Error handling
Xwire: Speed, range and capacities
Xwire: SPLat/PC Xwire window
Cutting and pasting code from the SPLat Knowledge Base
Programming examples
Example: Numeric data entry function with gear shift
Example: Controlling an RC servo
Example: Non-linear math functions using polynomials
Example: HMI Image Rotation
Example: CPU Unique IDs
Reference: More pulse counting
Support resources
SPDownLoad: program downloader
SPLogger: data logging application
SPLogger: SPLat Data Logging Utility
SPLogger: Installation
SPLogger: Overview
SPLogger: Operating instructions
SPLogger: Setting up what to monitor
SPLogger: Control pane
SPLogger: RAM data display
SPLogger: Status bar
SPLogger: Programming the SPLat board
reFlash: Updating the firmware in your controllers
reFlash: What is it?
reFlash: How do I determine what version Firmware is in my controller?
reFlash: How do I learn about an update?
reFlash: Why should I upgrade?
reFlash: Why would I NOT upgrade?
reFlash: Would I ever want to downgrade?
reFlash: What do I need to update a board?
reFlash: How do I update my board?
PIDassist: PID programming aid, simulator and tutorial
File resources
Warranties, Legal and Policies
Standard terms and conditions of sale
Standard product guarantee
3rd party products
Product disclaimer
Returns policy
Order cancellations
Re-stocking fees
Post-Nuke repair policy
SPLat educational discount policy
Copyright
Trademarks
Glossary of Terms
Build
Comment out
Controller
CPU
Data Memory
Dialect
Enduser
Event
Firmware
FP
Hardware
Hash command
Hash function
HMI
jndexed
Junction temperature
LiveData
Load
MMi99
NRE
NVEM
Pt100, Pt1000
RAM
reFlash
Register stack
RTD
SimpleHMI
Software
SPice
SPiceX
SPLatLink (formerly LiveData)
SPLatty
SPLatWare
Touch of SPice
Variac
WAF
X
Deprecated
# 4D_ViSi hash command - MultiTrack+ only!
# 4D_bWriteObj(ObjType, ObjIndex, aa) hash function
# 4D_fWriteObj(ObjType, ObjIndex, ff) hash function
# 4D_fWriteObjW(ObjType, ObjIndex) hash function
# 4D_ObjEvent(ObjType, ObjIndex, Handler) hash function
# 4D_NackEvent(Handler) hash function
# 4D_SetFormX() hash function
# 4D_WriteContrastX() hash function
# 4D_WriteObj(ObjType, ObjIndex, Value) hash function
# 4D_WriteObjX(ObjType, ObjIndex) hash function
# Port(p) hash function
# HMI Android & Windows
Formatting functions
Byte formatting function b(Source {, Format})
Floating point formatting function f()
Semaphore formatting function s(Source, TrueOutput, FalseOutput)
Literal formatting function L(item {,item ...})
NVEM string formatting function nz({Ptr}{,Item})
Colours
# ButtonEvent(ID, Row, Col, Height, Width, "text"{, Mode}, ClickHandler) hash function
# Cls()
# ColourWheelEvent(ev:EventHandler) hash function
# ConnectEvent(ev:EventHandler) hash function
# CursorRel(r|y:dRow, c|x:dColumn) hash function
# Enables(Mask) hash function
# GetRTC() hash function
# HBar(r|y:Row, c|x:Col, h:Height, w:FSWidth, v:Value) hash function
# HideAllButtons()
# IntInputEvent(t|p:"Prompt"{, L:Min}{, h:Max}, ev:EventHandler) hash function
# Print(Arg1{, Arg2 ...}) hash function
# Reset({i:BGImage}{, b:BGColour}) hash function
# Rulers() hash function
# ScreenWidthEvent(c:C, ev:EventHandler) hash function
# SetCursor(r|y:Row, c|x:Col) hash function
# SetImagePath(PathName)
# SetRTCEvent({EventHandler}) hash function
# SpeakNumb(n:Number{, L:Language}{, c:Country}{, q:ClearQueue}) hash function
# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function
HMI Deprecated Functions
# fDispW(f, p) hash function
# FloatVar(fArg, f, p) hash function
# HBarOld(Row, Col, Height, FSWidth, fArg) hash function
# HexDispX() hash function
# HexVar(bArg) hash function
# OldSpeakNumb(fNumb, f, p)
# PopBGColor() hash function
# PopColors() hash function
# PopFGColor() hash function
# PushColors() hash function
# SetBGColor(r:Red, g:Green, b:Blue {,a:Alpha}) hash function
# SetFGColor(r:Red, g:Green, b:Blue {,a:Alpha}) hash function
# uDispXFW() hash function
# uDispXVW() hash function
# HMI_Log hash command
fDispW(f, p) hash function
# FileOpen(FileName, Mode) hash function
# FloatVar(fArg, f, p) hash function
# HexDispX() hash function
# HexVar(bArg) hash function
# HHMMSS() hash function
# LogWrite() hash function
# NewFile(FileName) hash function
# Print(Arg1{, Arg2 ...}) hash function
# uDispXFW() hash function
# uDispXVW() hash function
# YYMMDD() hash function
# HMI_Trace hash command
# fDispW(f, p) hash function
# FloatVar(fArg, f, p) hash function
# HexDispX() hash function
# HexVar(bArg) hash function
# NL() hash function
# Print(Arg1{, Arg2 ...}) hash function
# TraceOff() hash function
# TraceOn() hash function
# uDispXFW() hash function
# uDispXVW() hash function
Knowledge Base
Support resources
SPLogger: data logging application
SPLogger: data logging application
In this Chapter
SPLogger: SPLat Data Logging Utility