Forum Home › Forums › Rapid SCADA on Linux Controllers and Raspberry Pi › Any questions about Rapid SCADA and Raspberry Pi
Tagged: Raspberry Pi 4
- This topic has 88 replies, 16 voices, and was last updated 4 months ago by Mikhail.
-
AuthorPosts
-
March 29, 2018 at 6:50 pm #3394MikhailModerator
jonbonjovi, manjey73 is the author of that driver.
they communicate via Modbus/TCP but I am still new to the protocol
It is simple. I recommend the official specs here http://www.modbus.org/specs.php to understand how it works.
April 9, 2018 at 11:36 pm #3445jonbonjoviParticipantI have put the KpRpi3.dll in the ScadaComm/KP directory and restarted the service, but Rapid Scada is not recognizing that I have installed the plug in. Is there something I am missing? The Readme for the Raspberry Pi GPIO controller does not explain the installation as far as I can read.
April 10, 2018 at 6:19 am #3449manjey73ParticipantYou need to set the connection driver in the xml file by specifying the bit mask settings.
example ScadaCommSvcConfig.xml
<!--Линия 6--> <CommLine active="true" bind="true" number="6" name="RPi"> <CommChannel type="" /> <LineParams> <Param name="ReqTriesCnt" value="1" descr="Количество попыток перезапроса КП при ошибке" /> <Param name="CycleDelay" value="0" descr="Задержка после цикла опроса, мс" /> <Param name="CmdEnabled" value="true" descr="Команды ТУ разрешены" /> <Param name="ReqAfterCmd" value="false" descr="Опрос КП после команды ТУ" /> <Param name="DetailedLog" value="true" descr="Записывать в журнал подробную информацию" /> </LineParams> <CustomParams /> <ReqSequence> <KP active="true" bind="true" number="52" name="GPIO Raspberry" dll="KpRpi3.dll" address="1" callNum="" timeout="1000" delay="200" time="00:00:00" period="00:00:00" cmdLine="268435439;268435455;268435455;268435455;1;" /> </ReqSequence> </CommLine>
It is also necessary to specify the communication line in the databases of the Scada server using a Windows PC and then transferred to the Raspberry Pi. You can also customize and Communicator
April 21, 2018 at 7:31 pm #3569jonbonjoviParticipantOk, so I am creating a Raspberry Pi device in the administrator program. How do I create a device type that uses the kprpi3.dll? I am trying to configure the output channels so I can have a button toggle the outputs on a couple pins. In the communicator, I have a communication line set up with kprpi3.dll so I can configure request sequences with it, but now I need to figure out the outputs.
April 21, 2018 at 8:55 pm #3570manjey73Participanthttps://github.com/Manjey73/OpnenKPs/blob/master/KpRpi3/Readme.md
Have you read the description in English from the link above ?
Executed the command sudo gpio readall ? The given command will display the table of numbering of the contacts in BCM format and GPIO format. When you configure channels on Windows, the channels are numbered in BCM format. The output of this command you can understand which pin number corresponds to bcm numbering.
https://i.stack.imgur.com/h4rgc.png – It is necessary to focus on the BCM numbering
April 21, 2018 at 8:58 pm #3571manjey73ParticipantYou must set the checkboxes to change direction to OUT. On the idea of under such a a combination of will are engaged physical contacts 3 and 5
April 22, 2018 at 3:28 am #3572jonbonjoviParticipantGotcha, I understand that on the communicator. Now when it comes to configuring the output lines in the administrator? I would like to tie a command to a button that sends a value of 1 to a certain GPIO pin. Do I need to set up a device type that has the kprpi3.dll or can I use the modbus device type instead?
April 22, 2018 at 5:42 am #3573manjey73ParticipantApril 22, 2018 at 1:13 pm #3576jonbonjoviParticipantThank you. From that point do you just use Create Channels under the services tab? It says the channels are missing, however it has the right DLL for my device (kprpi3).
At this point I am trying to understand how the output channels can send meaningful commands that operate the GPIO.
April 22, 2018 at 5:01 pm #3579manjey73ParticipantI created channels manually, because this mechanism is not implemented in the driver, if I can judge correctly.
April 22, 2018 at 7:45 pm #3581jonbonjoviParticipantDo you happen to have an example of what the output channels look like for you? I have created one for “Start” that ideally would be used to toggle one of the GPIO outputs.
Are these tied to the “requests” defined in the communicator application?
April 23, 2018 at 10:01 am #3593April 23, 2018 at 10:04 am #3594manjey73ParticipantAfter you have configured the Communicator and transferred the data to the Raspberry Pi and rebooted scadacomm, you will see the kpXXX file in the folder ScadaComm\log.txt, which you have attached to GPIO channels.In it you will see the table included with the numbering of gpio signals. Use this numbering in the input and control channels
April 23, 2018 at 6:43 pm #3604jonbonjoviParticipantThat helps me a lot, thank you.
Further clarification: What kind of command value are you using there? Is that a 1 for on and 0 for off?
April 24, 2018 at 6:27 am #3607manjey73ParticipantI used a relay Board that is controlled by a minus. Therefore, for convenience, I’ve done inversion of control commands and control. If you use this fee-free formulas then 0 will turn relay 1 off relay
-
AuthorPosts
- You must be logged in to reply to this topic.