![Kramer SL-280 Скачать руководство пользователя страница 51](http://html1.mh-extra.com/html/kramer/sl-280/sl-280_user-manual_2000924051.webp)
Kramer Electronics Ltd.
SL-280 – Protocol 3000
49
GPIO-CFG
Functions
Permission
Transparency
Set:
GPIO-CFG
End User
Public
Get:
GPIO-CFG?
End User
Public
Description
Syntax
Set:
Set
I/O
port
configuration
#
GPIO-CFG
␠
HwGpioNumber,HwGpioType,HwGpioDir,Pullup
␍
Get:
Get
I/O
port
configuration
#
GPIO-CFG?
␠
HwGpioNumber
␍
Response
~nn
@GPIO-CFG
␠
HwGpioNum,HwGpioType,HwGpioDir
␍␊
Parameters
HwGpioNum
–
I/O
port number:
1
–
8
HwGpioType
–
I/O
port type:
0
(analog),
1
(digital)
HwGpioDir
–
I/O
port direction:
0
(input),
1
(output)
Pullup
–
0
(disable),
1
(enable)
Response Triggers
Notes
Example
Set configuration for
I/O
port number 1 to digital input with the pull-up enabled:
#GPIO-CFG 1,1,0,1<CR>
GPIO-STATE
Functions
Permission
Transparency
Set:
GPIO-STATE
End User
Public
Get:
GPIO-STATE?
End User
Public
Description
Syntax
Set:
Set
I/O
port state
#
GPIO-STATE
␠
HwGpioNumber,HwGpioState
␍
Get:
Get
I/O
port state
#
GPIO-STATE
␠
HwGpioNumber
␍
Response
~nn
@
GPIO-STATE
␠
HwGpioNum,HwGpioState
␍␊
Parameters
HwGpioNum
–
I/O
port number (
1–8
)
HwGpioState
–
I/O
port state – See note below
Response Triggers
Notes
GPIO-STATE? can only be sent in digital mode and the answer is 0=Low, 1=High. In analog mode an error
message is sent.
GPIO-STATE can only be sent in digital out mode and the parameter is 0=Low, 1=High. In all other modes
an error message is sent.
The device uses this command to notify the user of whenever there is a change regarding the state.
Example
Set state for digital
I/O
port number 1 to high:
#GPIO-STATE
1,1<CR>