Rev. 8: 29-04-2021
38
Set Value
The
set
function will initialize the pin. We will provide the pin with which we are going to work
and the value that will be set. If we are working as the
analogical
option
, the value will work in
a range from
0
to
4095
, being this the maximum possible value (10 Vdc). Otherwise, for the
digital
option
a logical
1
will turn on the pin while a
0
will stop it. In the case that we want to
control a
relay option
, it will work out as a digital option, where a logical 1 will turn on the
device and the logical 0 will shut down it.
By default, if not value option is provided it will be initialized as a 1 for the Digital and for the
Relay or a 50% for the Analogic. If any other options are chosen, an error code will warn us. In
order to call the function, we will do the following:
There is also the
PWM option
(that must be executed from the set-analog-output script)
,
that
configures the output to work as PWM and you must specify as parameters the digital output
and the width of the pulse. The width of the pulse is the high time period of the duty cycle and
it has a range from 0 to 4095 (12 bits). For example, if you want a high time period of 25% you
must put 1024 and if you want a high time period of 100% you must put 4095.
The PWM parameters of the script do not have to be modified to ensure a correct behaviour of
the PWM.
NOTE:
See the
Section 8
to know which outputs are PWM supported.
./set-digital-output <output> <value>
./set-analog-output <output> <value>
./set-relay <output> <value>
./set-analog-output <output> <pulse width value>
Summary of Contents for Raspberry PLC 19R+
Page 1: ...RASPBERRY PLC FAMILY RASPBERRY PLC FAMILY...
Page 2: ...Rev 8 29 04 2021 1...
Page 3: ...Rev 8 29 04 2021 2 RASPBERRY PLC FAMILY Quick User Guide Revised February 2021...
Page 9: ...Rev 8 29 04 2021 8 General Description RASPBERRY PLC FAMILY Product Reference Table...
Page 10: ...Rev 8 29 04 2021 9 Zones Table Measures Table...
Page 27: ...Rev 8 29 04 2021 26 Raspberry PLC Family Pinout I Os Table...
Page 29: ...Rev 8 29 04 2021 28 Upper Side POWER INDICATOR RTC BATTERY CAN BUS ETHERNET2 CONNECTOR...
Page 35: ...Rev 8 29 04 2021 34 Equivalence Table Pin Out 11 1 1 Analog Digital Devices Analog I Os...
Page 36: ...Rev 8 29 04 2021 35 11 1 2 Digital I Os 11 1 3 Relay Devices Analog I Os...
Page 37: ...Rev 8 29 04 2021 36 11 1 4 Digital I Os 11 1 5 Relay...
Page 53: ...Rev 8 29 04 2021 52 Mail industrialshields industrialshields com...