background image

 

 

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> 
 

Содержание Raspberry PLC 19R+

Страница 1: ...RASPBERRY PLC FAMILY RASPBERRY PLC FAMILY...

Страница 2: ...Rev 8 29 04 2021 1...

Страница 3: ...Rev 8 29 04 2021 2 RASPBERRY PLC FAMILY Quick User Guide Revised February 2021...

Страница 4: ...tation Industrial Shields PLCs must be powered between 12Vdc and 24Vdc If a higher voltage is supplied to the equipment can suffer irreversible damage Maintenance must be performed by qualified person...

Страница 5: ...uide Do not disconnect equipment when a flammable or combustible atmosphere is present Disconnection of equipment when a flammable or combustible atmosphere is present may cause a fire or explosion wh...

Страница 6: ...ications 14 General Specifications 14 Performance Specification 15 Symbology 15 Precautions 16 Raspberry Board 16 Intended Audience 16 General Precautions 16 How to connect PLC to power supply 17 How...

Страница 7: ...3 Equivalence Table 34 Pin Out 34 11 1 1 Analog Digital Devices Analog I Os 34 11 1 2 Digital I Os 35 11 1 3 Relay Devices Analog I Os 35 11 1 4 Digital I Os 36 11 1 5 Relay 36 Internal I2C and SPI Co...

Страница 8: ...Rev 8 29 04 2021 7 Ethernet 43 Wi Fi 44 BLE 44 RTC 46 uSD 46 Additional family features 48 GPRS Family 48 Revision Table 50...

Страница 9: ...Rev 8 29 04 2021 8 General Description RASPBERRY PLC FAMILY Product Reference Table...

Страница 10: ...Rev 8 29 04 2021 9 Zones Table Measures Table...

Страница 11: ...B or C the I Os or Relay shield The inputs in the zone A B C are named IX X being X any number suitable in the Shield Outputs are named as QX X Zone Distribution This is the possible zones scheme whe...

Страница 12: ...1x RTC 1x Bluetooth 1x Wi Fi 1x SD Socket 1X CAN x1 HDMI Analog Shield 13 Inputs 8 Outputs 13 Digital inputs 6 of which can work as Analog Input 8 Digital Outputs 3 of which can work as Analog Output...

Страница 13: ...Rev 8 29 04 2021 12 Mechanical dimension These are the possible mechanical dimensions you can consult the specific measures for your device on the measures table...

Страница 14: ...3 3 V An Dig Input 10bit 0 10Vcc 0 to 10Vac Rated Voltage 10Vac 5 to 24Vdc I min 2 to 12 mA Galvanic Isolation Rated Voltage 24 Vdc Digital Isolated Input 24Vcc 5 to 24Vdc I min 2 to 12 mA Galvanic Is...

Страница 15: ...ltage 24 Vdc Power supply output capacity 700 Ma Insulation resistance 20M min at 500Vdc between the AC terminals and the protective earth terminal Dielectric strength 2 300 VAC at 50 60 Hz for one mi...

Страница 16: ...e equipment is suitable for direct current only to identify relevant terminals IEC 60417 Graphical symbols for use on equipment 5032 Alternating Current Indicates that the equipment is suitable for al...

Страница 17: ...eneral Precautions The user must operate Raspberry PLC according to the performance specifications described in this manual Before using the RASPBERRY PLC FAMILY under different conditions from what h...

Страница 18: ...regardless of where use of the device is intended The equipment must be powered from an external power source in accordance with IEC 61010 1 whose output is MBTS and is limited in power according to...

Страница 19: ...the terminal for windows users enter cnm in the windows searching tab to open it Note To use this local IP address you must connect the Ethernet cable to the Ethernet port located in the right side of...

Страница 20: ...e option of accepting the key or rejecting it You have to accept the key as it will be stored in the register and will be used to contrast it with the one sent by the server on each connection If for...

Страница 21: ...your local address for being in the same local network as the Raspberry You can use the ping command with the address 10 10 10 20 as option in the windows terminal The windows terminal can be found t...

Страница 22: ...notice in which the authenticity of the received key will be raised since someone could be posing as the server to which we want to connect Once connected will be a full access to the Raspberry PLC a...

Страница 23: ...ge it we will use the ifconfig program install if not by default in the system To change your IP address on Linux use the ifconfig command followed by the name of your network interface and the new IP...

Страница 24: ...in on the Properties button Finally a window will be displayed where we will be able to change the IP address Choose the second option and enter the following IP as the following image Then choose Acc...

Страница 25: ...ries of the Raspberry Pi PLC have administrator permits which will not allow to transfer file directly to them As a result the best option is to copy the files to the home pi directory and then move t...

Страница 26: ...host no another just click and drag from one place to the other Linux Linux system have by default the SCP protocol included on them In order to work with them it is only necessary to select a source...

Страница 27: ...Rev 8 29 04 2021 26 Raspberry PLC Family Pinout I Os Table...

Страница 28: ...Zone PLC Connector Raspberry Pin Function A B GND B A GND SDA SCL 5V 3 3V GND GPIO25 5V GND SCK SI SO NC RX TX Vdc GND GPIO2 GPIO3 GPIO25 GPIO11 GPIO10 GPIO9 GPIO15 GPIO14 RS485 2 RS485 2 GND RS485 1...

Страница 29: ...Rev 8 29 04 2021 28 Upper Side POWER INDICATOR RTC BATTERY CAN BUS ETHERNET2 CONNECTOR...

Страница 30: ...Digital Input GND I0 3 Digital Input GND I0 2 Digital Input GND I0 1 Digital Input GND I0 0 Digital Input X Zone Raspberry PLC Connector Function GND AX 72 AX 62 AX 52 Q Vdc COM QX 72 QX 62 QX 52 QX...

Страница 31: ...tal PWM Out Digital PWM Out External Isolated Out GND External Isolated Out Vdc C Zone M Duino Connector Function RX 3 RX 2 RX 1 GND IX 5 IX 4 IX 3 IX 2 IX 1 INT4 IX 1 IX 0 INT4 IX 0 Relay Out Relay O...

Страница 32: ...Configuration Analog Digital Zone ZONE A ZONE B ZONE C SWITCH ON OFF SWITCH ON OFF SWITCH ON OFF NC NC NC Q0 7 Q0 7 A0 7 Q1 7 Q1 7 A1 7 Q2 7 Q2 7 A2 7 Q0 6 Q0 6 A0 6 Q1 6 Q1 6 A1 6 Q2 6 Q2 6 A2 6 Q0 5...

Страница 33: ...well protected as the normal inputs These pins are mainly meant to be used as prototyping The Raspberry board available pins are summarized in the table below In order to access to these pins some ex...

Страница 34: ...erwise an external pull up or pull down circuit could be set GPIO25 GPIO25 is a Raspberry PI 4 GPIO pin that can be set as an input or output It does not have any default function so it can be configu...

Страница 35: ...Rev 8 29 04 2021 34 Equivalence Table Pin Out 11 1 1 Analog Digital Devices Analog I Os...

Страница 36: ...Rev 8 29 04 2021 35 11 1 2 Digital I Os 11 1 3 Relay Devices Analog I Os...

Страница 37: ...Rev 8 29 04 2021 36 11 1 4 Digital I Os 11 1 5 Relay...

Страница 38: ...om the correct path It depends on the shield type of the I O executed To be sure of your device s shields you can consult the section 1 2 Zones Table to ensure it For example the Raspberry PLC 57 AAR...

Страница 39: ...r 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...

Страница 40: ...1 7 2 7 As for the relay option we can call the function as the following example Respect the PWM all the digital output pins can work as PWM so we must also consider the stop function in case that th...

Страница 41: ...from Ix 7 to Ix 12 The analog function works on a 4096 range returning a value from 0 0 Vdc to 4095 10 Vdc In order to call the function we will do the following As for the get temp function it will...

Страница 42: ...by default the start fan function could disable it 13 4 2 Stop Fan The stop fan function will deactivate the fan of the Raspberry PLC on the moment that the command is called Consider that if there i...

Страница 43: ...ing these ports with the desired programming system For example we can use the following bash script instruction to see the data coming from the RS 485 2 It will stay opened waiting for data to read C...

Страница 44: ...omatically generated by the Raspberry PI 4 In the RASPBERRY PLC FAMILY W5500 IC communicates to the Raspberry PI 4 via SPI1 bus If you open a terminal windows and exec ip addr you will see all the net...

Страница 45: ...berry sudo nano etc wpa_supplicant wpa_supplicant conf And we must configure the file with the Wi Fi network configuration parameters it can change depending on the specific configuration of each case...

Страница 46: ...ss Enter to return to the command line Example of connecting mode on your Raspberry Pi BLE using an Android device To be able to get data from your Android phone you must install a text based modem co...

Страница 47: ...ually infinite precision To read the Hardware Clock and print its time to standard output in the ISO 8601 format type the following hwclock r To set the Hardware Clock to the time given by the date op...

Страница 48: ...s folder create a file called pre poweroff The file type can be anyone you want Bash Scripts Python C etc but the most important thing is that it must be called pre poweroff without any extension you...

Страница 49: ...rding about enabling the serial port hardware will be shown We must accept it If we have done the steps satisfactorily a message saying that the serial login shell is disabled and the serial interface...

Страница 50: ...Some of the files will require modifying them with the superuser option sudo The options that we will have to change are etc ppp pap secrets User and Password etc ppp gprs connect APN etc ppp peers g...

Страница 51: ...03 02 21 Change on section 12 3 05 02 21 Change on the screen printing of section 7 1 4 10 02 21 Change on the PWM outputs 5 11 02 21 Added Section 14 Additional Family Features 6 15 02 21 Added Sect...

Страница 52: ...Rev 8 29 04 2021 51 About Industrial Shields Direction F brica del Pont 1 11 Zip Postal Code 08272 City Sant Fruit s de Bages Barcelona Country Spain Telephone 34 938 760 191 34 635 693 611...

Страница 53: ...Rev 8 29 04 2021 52 Mail industrialshields industrialshields com...

Отзывы: