7. LW3 Programmers’ Reference
UCX series – User's Manual
130
Applied firmware package: v1.2.0b9 | LDC software: v2.5.10b1
8.17.4.
Setting the Output Level of a GPIO Pin
Command and Response
ç
SET·/V1/MEDIA/GPIO/
<port>
.Output(
<value>
)
æ
pw·/V1/MEDIA/GPIO/
<port>
.Output(
<value>
)
Parameters
See the previous section.
Example
ç
SET /V1/MEDIA/GPIO/P1.Output=High
æ
pw /V1/MEDIA/GPIO/P1.Output=High
8.17.5. Setting the Output Level for a Specified Time
Command and Response
ç
CALL·/V1/MEDIA/GPIO/
<port>
:interval(
<value>
;
<time>
)
æ
mO·/V1/MEDIA/GPIO/
<port>
:interval=
Parameters
Parameter
Parameter description
Value
Value description
<value>
The output value of the GPIO pin.
High
high level
Low
low level
<time>
Duration of the desired value in seconds.
1-120
second
Example
ç
CALL /V1/MEDIA/GPIO/P1:interval(Low;1)
æ
mO /V1/MEDIA/GPIO/P1:interval=
8.17.6.
Toggling the Level of a GPIO Pin
The output level can be changed from high to low and low to high by the command below.
Command and Response
ç
CALL·/V1/MEDIA/GPIO/
<port>
:toggle()
æ
mO·/V1/MEDIA/GPIO/
<port>
:toggle
Example
ç
CALL /V1/MEDIA/GPIO/P1:toggle()
æ
mO /V1/MEDIA/GPIO/P1:toggle
8.18. OCS Port Configuration
DIFFERENCE:
Occupancy sensor-related commands are available only from FW package 1.1.0b7.
8.18.1. Querying the Input Level of an OCS Pin
Command and Response
#ocs
ç
GET·/V1/MEDIA/OCS/P1.InputLevel
æ
pr·/V1/MEDIA/OCS/P1.InputLevel=
<value>
Parameters
Parameter
Parameter description
Value
Value description
<value>
The input value of the OCS pin.
High
high level
Low
low level
Example
ç
GET /V1/MEDIA/OCS/P1.InputLevel
æ
pr /V1/MEDIA/OCS/P1.InputLevel=Low
8.18.2.
Set the Sensor Type
Command and Response
ç
SET·/V1/MEDIA/OCS/P1.SensorType=
<sensor_type>
æ
pw·/V1/MEDIA/OCS/P1.SensorType=
<sensor_type>
Parameters
Parameter
Parameter description
Value
Value description
<sensor_type>
It defines that the low or high
input level means the occupancy.
Active low
Occupancy status is
'Occupied' when the
input level is low.
Active high
Occupancy status is
'Occupied' when the
input level is high
(default value).
Example
ç
SET /V1/MEDIA/OCS/P1.SensorType=Active low
æ
pw /V1/MEDIA/OCS/P1.SensorType=Active low