Version 4 (modified by 15 years ago) ( diff ) | ,
---|
Table of Contents
- Application Libraries
- Database Libraries
- Standard 825 Library with Application class (lib825)
- Standard 825 Library with EVENT features (lib825ev)
- Communications Functions
- CComm
- CCommClient
- CCommSerial
- CCommServer
- Analog Output (DAC Digital to Analog Conversion) Functions
- GetDAC
- GetDACPercent
- GetDACRangeFromIndex
- GetIndexFromDACRange
- SetDACFloat
- SetDACOutputRange
- SetDACPercent
- SetDACReg
- SetDACTrackGrossNet
- SetDACTrackScale
- StopDACTrackScale
- Debug Functions
- DEBUG_MSG
- DEBUG_SHOWDATA
- Display Functions
- CBitmap
- CFont 825gen2
- CImage 825gen2
- ClearLCD
- DisplayStr DEPRECATED - Replace with DisplayText
- DisplayText
- GetX
- GetY
- InitLCD
- IsFontLoaded
- LocateLCD
- PrintLCD
- PrintLCDbutton
- PrintLCDfont2
- ReadFont
- SetBkColor
- SetCurColor
- File Functions
- CFile
- FileCopy
- FindChromiumPath 825gen2
- FindFlashDrive 825gen2
- GetFilesInPathWithExtension
- IsMounted
- MakeDirIfNotExists
- MountDirectory 825gen2
- UnmountDirectory 825gen2
- Form Functions
- CForm
- CFormRect 825gen2
- EVENT
- EVENT_FLAG_SHOW
- EVENT_SHOW_BTN_CONTENT
- EnableItem
- ExitWithCode
- FORM_ADD_BUTTON
- FORM_ADD_BUTTON2 825gen2
- FORM_ADD_INPUT
- FORM_ADD_INPUT2 825gen2
- FORM_DONE_ESCAPE
- FORM_DONE_EVENT_EXTERNAL
- FORM_DONE_LEFT_ARROW
- FORM_HIDE
- FORM_INIT
- FORM_IS_UPDATED
- FORM_RUN
- FORM_SHOW
- FindName
- GetCurrentItemIndex
- GetExitCode
- GetItem
- !GetItemByIDVal
- GetItemCount
- GetItemIndex
- HideItem
- IN_EVENT_HIDE_FORM
- IN_EVENT_SHOW_FORM
- IN_EVENT_WRITE_DATA
- IsChanged
- SetInputFont
- SetKeyEvent
- ShowItem
- WriteData
- Input / Output (Digital I/O) Functions
- GetInput
- GetInputMask
- GetOutput
- SetDIOCounter
- SetOutput
- SetOutputMask
- StartDIOPulse
- StartRepeatIO Deprecated
- StopDIOPulse
- StopRepeatIO Deprecated
- Keypad/Sound Functions
- ClearKeyBuffer
- KeyPadInsertKey
- KeyPadSetUSBEvent
- OpenBeeper
- PlayNotes
- WaitKeypress
- Process Functions
- GetProcessID
- GetProcessIDExcludeSelf
- KillProcess
- ResetPrevGrossWt
- ResetPrevNetWt
- ResetPrevTareWt
- test
- String Functions
- FloatToStr
- IntToStr
- StrFmt
- StrFmtLen
- StrToFloat
- StrToInt
- StrTrimLeft
- StrTrimRight
- Ticket Functions
- CTktFlds
- PrintTkt
- Time and Date Functions
- CMillisecondTimer
- CSleep
- CTimer
- DoSleep
- GetDateStr
- GetLinuxTime
- GetTimeStr
- IsTimeChanged
- ResetPrevTime
- SleepMilliseconds
- SleepSeconds
- Utility Functions
- GetKernelVer
- GetKernelVerStr
- GetLoaderVer
- GetLoaderVerStr
- GetMemFree
- GetMnBdVer
- GetMnBdVerStr
- Weighing Functions
- CheckWIM * DEPRECATED - New apps should use MnBdSetWIM *
- DLCRepeatMultiIncludeCellWts
- FormatGrossWt
- FormatNetWt
- FormatTareWt
- FormatWt
- GetBelowZero
- GetCapacity
- GetCenterZero
- GetCurUnitsLabel
- GetDecimal
- GetGrossWt
- GetInterval
- GetMotion
- GetNetWt
- GetNumScales
- GetOverCap
- GetProcessScale
- GetSecUnitsLabel
- GetTareWt
- GetUnitsLabel
- GetWtError
- IsGrossWtChanged
- IsNetWtChanged
- IsTareWtChanged
- IsWtStatusChanged
- IsWtUnitsChanged
- MnBdClearEvent
- MnBdClose
- MnBdGetErr
- MnBdGetErrMsg
- MnBdGetErrMsgStr
- MnBdOpen
- MnBdProcess * DEPRECATED - New apps should use StartRepeatMulti *
- MnBdRead
- MnBdRequest
- MnBdSetEvent
- MnBdSetWIM
- MnBdShutdown
- MnBdStartup
- RequestWt * DEPRECATED - New apps should use StartRepeatMulti *
- ResetPrevGrossWt
- ResetPrevNetWt
- ResetPrevTareWt
- ResetPrevWtStatus
- ResetPrevWtUnits
- SetTareCurrent
- SetTareValue
- SetWIM * DEPRECATED - New apps should use MnBdSetWIM *
- StartRepeatMulti
- StartRepeatWt * DEPRECATED - New apps should use StartRepeatMulti *
- StopRepeatMulti
- StopRepeatWt * DEPRECATED - New apps should use StopRepeatMulti *
- ZeroScale
- Development Environment
- Application Signing
- Debugging
- Setup for Software Development
- Version Control
- Device Support
- Device Drivers
- Beeper
- Display
- Network
- Serial Ports
- USB Support
- Weighing
- Foundation
- Application Mode Startup
- Shell operations - Linux / Windows command line Reference
DIO
Digital I/O
echo “L000000020000000F” > /dev/mnbd
This sets the state of the mainboard digital outputs. The “L” is the command, the following 8 characters or four hexadecimal bytes represent the state desired. The final 8 characters or four hexadecimal bytes represent a mask of which outputs are to be affected. In this example “F” is used as the mask to set the state of all four on-board outputs.
# echo “I” > /dev/mnbd
This requests the status of the mainboard digital I/O.
# cat < /dev/mnbd
response:
# IA000000000
The last 8 character of the response are hexadecimal digits. Of these the first 4 digits are the state of the digital inputs. The final 4 digits are the state of the outputs. If the input 1 only is active the response is:
# IA000010000
If inputs one and two are active the response is:
# IA000030000
If inputs one, two, three, and four are active the response is:
# IA0000F0000
Only a single hexadecimal digit is needed to represent the state of the four mainboard inputs.
Response | Input 1 | Input 2 | Input 3 | Input 4 |
0 | Off | Off | Off | Off |
1 | On | Off | Off | Off |
2 | Off | On | Off | Off |
3 | On | On | Off | Off |
4 | Off | Off | On | Off |
5 | On | Off | On | Off |
6 | Off | On | On | Off |
7 | On | On | On | Off |
8 | Off | Off | Off | On |
9 | On | Off | Off | On |
A | Off | On | Off | On |
B | On | On | Off | On |
C | Off | Off | On | On |
D | On | Off | On | On |
E | Off | On | On | On |
F | On | On | On | On |
For additional structure formats refer to MainboardProtocol
The lib825 library provides functions to facilitate applications performing digital I/O tasks.
For digital I/O event operations refer to the DioEvent class.
DIO Events
About
This document will guide the programmer through the process of creating and using a simple DIO Event using the DioEvent class provided in the standard library (lib825). DIO Events are processed by the mainboard in order to allow a level of redundancy. Should the OPI board kernel crash the mainboard will continue to provide relay functionality and will disable events when their thresholds are reached.
The Code
To use a DIO event follow the example code below.
The above code would create an event that would enable board 0 (mainboard) pin 0 when the gross weight of scale 1 is less than 250.00 and greater than 0.00.
DIO Counting
Description
Mainboard software 1.15 is required for counting feature. Kernel 2009-10-07 or later is required. All four inputs of the mainboard may be used for counting. The DIO cards allow any one of inputs 1 - 7 to be used for counting. Input 8 may also be used for counting. This allows for up to two inputs per DIO card to be used for counting.