SDK - SYSBoard Controller - Plugin SDK
SDK - SYSBoard Controller - Plugin SDK
Concept
File Naming
You may create subfolders with \Plugins to store Config or Log files.
Implementation
Plugin communication consists of two types of Function and Procedure calls.
1) Calls from your dll to the SYSBoardController.
2) Calls from the SYSBoardController to your dll.
It is important that you Export the output calls in your dll so that they can be
triggered by the SYSBoardController.
Exports SYSBoardController_Initialize
SYSBoardController_Loop
SYSBoardController_Output
SYSBoardController_Servo_Output
SYSBoardController_Get_Input_State
SYSBoardController_Finalize
Please Note : Any code examples in this document are written in Delphi.
You will need to translate the syntax as required.
Calls TO the SYSBoard Controller
function IO_Initialize_STDCALL
(IO_board_id, IO_board_type, IO_board_desc : pchar;
IO_switch_count, IO_output_count, IO_analogue_count,
IO_servo_count, IO_7seg_count,
IO_switch_start, IO_switch_end,
IO_output_start, IO_output_end,
IO_analogue_start, IO_analogue_end,
IO_servo_start, IO_servo_end : word) : smallint
stdcall external 'SYSBoard_Plugin.dll';
function IO_Process_Switch_STDCALL
(IO_unique_id, IO_switch, IO_direction : word) : smallint;
stdcall external 'SYSBoard_Plugin.dll';
function IO_Process_Analogue_STDCALL
(IO_unique_id : word; IO_axis,IO_value : integer) : smallint;
stdcall external 'SYSBoard_Plugin.dll';
function IO_Finalize_STDCALL
(IO_unique_id : word) : smallint;
stdcall external 'SYSBoard_Plugin.dll';
Procedure IO_Log_STDCALL
(IO_level : integer; IO_msg : pansichar);
stdcall external 'SYSBoard_Plugin.dll';
Used to write a text message to the SYSBoard Controller Plugin Log window
(and Log File if enabled)
IO_Level : 0 = INFO 1 = WARNING 2 = ERROR
procedure IO_MSG_Event_STDCALL
(IO_Msg : integer; IO_Data : double);
stdcall external 'SYSBoard_Plugin.dll';
Exports SYSBoardController_Initialize
SYSBoardController_Loop
SYSBoardController_Output
SYSBoardController_Servo_Output
SYSBoardController_Get_Input_State
SYSBoardController_Finalize
The exported functions are used by the Sysboard Controller to call your
plugin. You should EXPORT the above calls in your plugin.
function SYSBoardController_Servo_Output
(IO_unique_id, IO_Output : word;
IO_Value, IO_Acceleration : integer) : smallint;
stdcall
function SYSBoardController_7Seg_Output
(IO_unique_id, IO_Output : word; IO_Value : PChar) : smallint;
stdcall
function SYSBoardController_Get_Input_State
(IO_unique_id, IO_Switch : word) : smallint; stdcall
You can place any initialization that your plugin requires here…
Initialize variable…
Setup the link to the hardware…
Etc
Once you have establish a connection to the hardware you should call
function IO_Initialize_STDCALL. To register the device with the Controller.
Return = Unique ID
This should be stored and used as a reference in future calls.
byte = 1 byte
word = 2 byte Unsigned
integer = 4 byte Signed
smallint = 2 byte Signed