![Lightware MMX8x4-HT Series Скачать руководство пользователя страница 123](http://html1.mh-extra.com/html/lightware/mmx8x4-ht-series/mmx8x4-ht-series_user-manual_1915437123.webp)
8. LW3 Programmers' Reference
MMX8x4-HT series – User's Manual
123
Applied firmware package: v1.2.2b5 | LDC software: v2.2.1
8.13. Relay Port Configuration
8.13.1.
Set Relay Connection Status
INFO: This command is available in MMX8x4-HT420M model.
Command and Response
#relay
Ý
SET•/MEDIA/RELAY/
<relay_port>
.Output=
<relay_status>
Ü
pw•/MEDIA/RELAY/
<relay_port>
.Output=
<relay_status>
Parameters
Identifier
Parameter description
Parameter values
<relay_port>
Relay port number
P1-P4
<relay_staus>
Relay port status
O
: Open
C
: Close
Example
Ý
SET /MEDIA/RELAY/P1.Output=C
Ü
pw /MEDIA/RELAY/P1.Output=C
P1 relay port is set to be closed.
8.14.
GPIO Port Settings
INFO: This command is available in MMX8x4-HT420M model.
8.14.1.
Set the Direction of a GPIO Pin
Command and Response
#gpio
Ý
SET•/MEDIA/GPIO/
<gpio_port>
.Direction=
<dir>
Ü
pw•/MEDIA/GPIO/
<gpio_port>
.Direction=
<dir>
Parameters
<dir>
I
: input direction of the GPIO pin
O
: output direction of the GPIO pin
Example
Ý
SET /MEDIA/GPIO/P1.Direction=I
Ü
pw /MEDIA/GPIO/P1.Direction=I
8.14.2.
Set the Output Level of a GPIO Pin
Command and Response
Ý
SET•/MEDIA/GPIO/
<gpio_port>
.Output=
<value>
Ü
pw•/MEDIA/GPIO/
<gpio_port>
.Output=
<value>
Parameters
Identifier
Parameter description
Parameter values
<gpio_port>
GPIO port number
P1-P6
<value>
Value of the GPIO pin
H
: High level
L
:
Low level
Example
Ý
SET /MEDIA/GPIO/P1.Output=H
Ü
pw /MEDIA/GPIO/P1.Output=H
8.14.3.
Toggle the Level of a GPIO Pin
Command and Response
Ý
CALL•/MEDIA/GPIO/
<gpio_port>
:toggle()
Ü
pw•/MEDIA/GPIO/
<gpio_port>
:toggle
Example
Ý
CALL
/MEDIA/GPIO/P1:toggle()
Ü
mO
/MEDIA/GPIO/P1:toggle
If the direction of the pin is input: the output value is toggled.
If the direction of the pin is output: the output value and the input value are toggled.
8.15.
USB Port Settings
8.15.1.
USB Host Select
Command and Response
#usb
Ý
SET•/MEDIA/USB/USBSWITCH.HostSelect=
<USB_host>
Ü
pw•/MEDIA/USB/USBSWITCH.HostSelect=
<USB_host>
Parameters
Identifier
Parameter description
Parameter values
<USB_host>
Active USB-B port
1-4, 0 means off
Example
Ý
SET /MEDIA/USB/USBSWITCH.HostSelect=1
Ü
pw /MEDIA/USB/USBSWITCH.HostSelect=1