hello everyone.
hope you all are doing well.
I want help regarding the RSC output using.
as I was using the RSC bool and Integer form now I want to use it further.
using above command it give the bool False value
can I use this False or Integer value further?
I assume you’re using the PyPlcnextRsc library in Python?
According to this article:
Read and Write PLC Process Data with Python - PLCnext Community PLCnext Community … the next step in reading the value is this:
# get the value of the read_item
item_value = read_item.Value.GetValue()
# get the data type of the read_item
item_type = read_item.Value.GetType()
If the documentation does not answer your question, perhaps you can contact the developer?
Their email address is on the project page:
https://pypi.org/project/PyPlcnextRsc/
Hello abdull111,
I don’t see in your code the program instance, the data access service can’t access to the variable and return „false“!
Please see the following explanation:
„Arp.Plc.Eclr/DataAccessInstance.Int_OUT“
* The Access Variable is "Int_OUT"
* The Program Instance is "DataAccessInstance"
Please find the full example under following link, I think it can help you:
CppExamples/README.MD at master · PLCnext/CppExamples (github.com)
BR
Eduard
thank Martin, can I use this RSC PyPlcnextRsc library in GCC (C++)
okay Eduard, i will look into that. Thank alot.
can I use this RSC PyPlcnextRsc library in GCC (C++)Maybe, but I don’t know why this would be necessary.
For access to RSC services on the local device, the native C++ RSC API would be the most suitable.
For access to RSC services from remote machines, gRPC services will be accessible from remote machines in a future firmware version, hopefully later this year.
thanks a lot Martin.
I didn’t have GCC in the PLC Linux. how to get the GCC as apt is also not install in the 2022 version. is there any other command.
GCC is not included with the firmware, nor is it advised to install development tools like this on a PLCnext Control device itself. Instead, applications should be cross-compiled on a host machine (either Windows or Linux x64) using the SDK for the target device. The SDKs include a version of C++ development tools (including gcc) suitable for the target.
The first step of the Sample Runtime example shows how to cross-compile a simple „Hello World“ example for a PLCnext Control device on a Linux x64 host. There are other ways to achieve the same result.
Oh.
As I was planning to have an on platform C++ Application.
can we use python for ML and AL right.
any solve example or tutorial or documentation would be helpful?
thanks in advance.
I was planning to have an on platform C++ Application.You can run an application that is written in C++ on a PLCnext Control device, you just have to compile it first. Can you clarify what you mean by „an on platform C++ Application“?
can we use python for ML and AL right.Yes, I believe so. That wouldn’t necessarily be specific to PLCnext Control devices.
I’m not sure if this qualifies, but here is an example of one user application:
OpenCV - Python, Red Light detection on PLCnext - PLCnext Community Open CV is one of the most used Computer Vision libraries out there. Open CV can be used for face recognition, object tracking, scanning barcodes and more important for this blog, detecting if a light is on or off. In this blog I’ll help you get started with Open CV and Python on PLCnext and […] The new AXC F XT ML 1000 is also designed for these types of applications.
thanks
by On Platform I meant the application on the PLC Linux OS life a background software(its rough idea). And yes it will run according to the function.
thanks for the shared example.
hello
if may i ask if you have the working example of native C++RSC API?
thanks in advance
The minimum code required to implement an RSC client in C++ is shown on this page:
Using RSC services You have the option of using the already registered RSC services of the SDK via the ServiceManager. The ServiceManager acts as the RSC API and is used to request services. There are lots of complete examples in the CppExamples Github repository, e.g. an example showing how to use the Data Access Service:
CppExamples/Examples/DataAccess at master · PLCnext/CppExamples Collection of various C++ sample code for PLCnext Technology controllers. - CppExamples/Examples/DataAccess at master · PLCnext/CppExamples