Switches

Switches

SL are switches “local” to the controller board, as in the switch matrix, etc. on the FAST WPC/WPC-S Controller. Order of Switches:

 

Matrix 0x00-0x4F (0-79)

Direct 0x50-0x57 (80-87)

DIP 0x58-0x5F (88-95)

Fliptronic 0x60-0x67 (96-103)

 

Note that even though most WPC machines do not have 80 matrix switches, the switch numbers of the FAST

 

SN are switches on the “network” using our FAST I/O Boards.

RETURN SWITCH DATA Command

SA:<CR>

  • SA:<Number of local switch bytes +1>,LLLLLLLLLLLLLLLLLLLLL,<Total Number of Network bytes +1>,NNNNNNNNNNNNNNNNNNNNNNNNNN<CR>

where LLLLLLLLLLLLLLLLLLLLL = variable length list of local switches and NNNNNNNNNNNNNNNNNNNNNNNNNN =  variable length list of network switches

CONFIGURE SWITCH Command

Description of CONFIGURE SWITCH Command goes here.

 

[SL/SN]:<SWITCH NUMBER>,<MODE>,<DEBOUNCE_CLOSE>,<DEBOUNCE_OPEN>

  • <SWITCH NUMBER>
    • Any switch id in the system
  • <MODE>
    • 0 = No Report
    • 1 = Report normal
    • 2 = Report Inverted
  • <DEBOUNCE_CLOSE>
    • Time to debounce switch close in mS. Default 30mS (1E hex) 256mS max (range 00-FF hex)
  • <DEBOUNCE_OPEN>
    • Time to debounce switch open in mS. Default 30mS (1E hex) 256mS max (range 00-FF hex)

 

Entering SL/SN:<CR> will return all the switch states similar to SA, but only local switches, or only network switches

 

Send All Local Switch states (in Bytes)

SL:<CR>

returns

SL:<Number of local switch bytes +1>,LLLLLLLLLLLLLLLLLLLLL<CR>

 

Send All Network Switch states (in Bytes)

SN:<CR>

returns

SN:<Number of network switch bytes +1>,NNNNNNNNNNNNNNNNNNNNNNNNNN<CR>

 

Query Switch parameter Command

SL/SN:<Switch ID><CR>

send the parameters for the given switch

The return for these commands is:

SL or SN followed by ‘:’ <SWITCH NUMBER><CR>

examples:

SN:2<CR> will return the string

SN:2,1,20,20<CR> will return the string (depending on parameters set)

 

SL:20<CR> will return the string

SL:20,1,20,20<CR> will return the string (depending on parameters set)

 

To Set Switch Parameters the command is

[SL/SN]:<SWITCH NUMBER>,<MODE>,<DEBOUNCE_CLOSE>,<DEBOUNCE_OPEN>

examples:

SN:8,1,20,20<CR>

set network switch 0x08 to report normal, Debounce close time = 0x20mS, Debounce open time – 0x20mS

response from these commands is SL/SN:P or SL/SN:F

 

The Command

SN:8,1,20,20<CR>

will return

SN:P<CR>

 

The Command (There is no switch mode 5)

SL:8,5,20,20<CR>

will return

SL:F<CR>

 

Send All Switch configuration data for Local or Network switches

SL/SN:L<CR>

 

returns:

SL:<Number of Local switches><CR>

SL:<Switch number 0><Switch Mode><Switch Close Debounce><Switch open debounce><CR>

SL:<Switch number 1><Switch Mode><Switch Close Debounce><Switch open debounce><CR>

 

.

.

.

SL:<Slast Switch><Switch Mode><Switch Close Debounce><Switch open debounce><CR>

 

example output for command SN:L<CR>

SN:4

SN:00,01,1E,1E

SN:01,01,1E,1E

SN:02,01,1E,1E

SN:03,01,1E,1E

 

SWITCH MESSAGES

Switches are the only asynchronous events..

 

/N or -N <SWITCH NUMBER><CR> Network switch opened/closed

/N:10<CR>  = network switch 0x10 opened

-N:10<CR>  = network switch 0x10 closed

 

/L or -L <SWITCH NUMBER><CR> Local switch opened/closed

/L:05<CR>  = local switch 0x05 opened

-L:05<CR>  = Local switch 0x05 closed