I am a new learner with Codesys and Qt. I want to make a very simple GUI that will control a stepper motor through codesys. But I could not find any resources about that. can one has any solution ? or reference ? I also read Qt documentation but its not helping. Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You'll need to lookup how Qt gets its data and then look for a tutorial that explains that process. I'm not familiar with Qt but some light googling suggests it supports OPC UA and TCP/IP communication.
I did find some starter info by just googling "Qt and Codesys" including this project which may or may not be helpful. It seems to use Codesys's network variable UDP protocol.
But if you just want a simple visualization Codesys's built in visualization tools are more than enough. If you're not specifically looking to learn how to use Qt with Codesys that is.
Last edit: Morberis 2020-11-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here are a couple of the Youtube channels that I know about and which might be helpful for you.
The official Codesys Channel - some good official videos Tohid Alizadeh - Really good tutorials. At this point they are quite extensive Real Pars - More generic PLC stuff, alot of Siemens. Good for generalized knowledge Jesse Cox - More Wago e!Cockpit but some Codesys related videos. Also some of the e!Cockpit stuff can be applied to Codesys Kurt Braun - Again more wago stuff but he has some very interesting integration videos. The DINrPlate dinrail mounting options for SBC's that he uses are very nice. Jesse Cox also uses them but I ran across Kurt Braun first.
There are more videos or channels that you might find if you do a search about a specific subject like recipe management.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Windows RTE you can use QSharedMemory, you must run application as administrator and use only GLOBAL shared memory. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
In Windows not RTE you can use local memory, you can run app as same user of runtime. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
In Linux QSharedMemory has some problem with codesys, you can run OS application from any user. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
There is a sample of code, we are using in many field applications.
This work in Windows and Linux.
I am a new learner with Codesys and Qt. I want to make a very simple GUI that will control a stepper motor through codesys. But I could not find any resources about that. can one has any solution ? or reference ? I also read Qt documentation but its not helping. Thank you
more posts ...
Here are some youtube tutorials you may find helpful.
https://www.youtube.com/results?search_query=codesys+visualization+tutorial
But I want some example or description that worked with Qt C++ framework also.
You'll need to lookup how Qt gets its data and then look for a tutorial that explains that process. I'm not familiar with Qt but some light googling suggests it supports OPC UA and TCP/IP communication.
I did find some starter info by just googling "Qt and Codesys" including this project which may or may not be helpful. It seems to use Codesys's network variable UDP protocol.
But if you just want a simple visualization Codesys's built in visualization tools are more than enough. If you're not specifically looking to learn how to use Qt with Codesys that is.
Last edit: Morberis 2020-11-23
Here are some youtube tutorials you may find helpful.
https://www.youtube.com/results?search_query=codesys+visualization+tutorial
Here are a couple of the Youtube channels that I know about and which might be helpful for you.
The official Codesys Channel - some good official videos
Tohid Alizadeh - Really good tutorials. At this point they are quite extensive
Real Pars - More generic PLC stuff, alot of Siemens. Good for generalized knowledge
Jesse Cox - More Wago e!Cockpit but some Codesys related videos. Also some of the e!Cockpit stuff can be applied to Codesys
Kurt Braun - Again more wago stuff but he has some very interesting integration videos. The DINrPlate dinrail mounting options for SBC's that he uses are very nice. Jesse Cox also uses them but I ran across Kurt Braun first.
There are more videos or channels that you might find if you do a search about a specific subject like recipe management.
Hi
it is easy to share variables using shared memory with Qt, i think
For anyone that is looking for how to do this here is a sample project on shared memory communication.
do something like that in Qt to read and map the shared memory
// Setup the shared memory
ifndef WINDOWS32
endif
Did you do this? If you can, can you share your files or code?
Shared memory is a right way, but...
In Windows RTE you can use QSharedMemory, you must run application as administrator and use only GLOBAL shared memory. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
In Windows not RTE you can use local memory, you can run app as same user of runtime. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
In Linux QSharedMemory has some problem with codesys, you can run OS application from any user. Shared memory should instantiated by OS application and not from CODESYS due visibility problems.
There is a sample of code, we are using in many field applications.
This work in Windows and Linux.
If I'd were in your footsteps, I'd implemented a socket interface instead of a shared memory one.
OK, thank you :)
include "advabstractmemorymanager.h"
include "advmemorymanager_global.h"
These are not found. I can't compile them.
It's only an Example!
You can extract the code you need.
Included parts are only to integrate shm in our framework.
Look at private methods. You can take that methods and modify a little bit.
Ok thank you so much.