Oleg_IT
Hello.
Three questions.
1. I need to include the boost library in my implementation of hardware_layer.cpp. Do I need to change the compile_program.sh script to do this? This script has many lines with included libraries, for example
g++ -std=gnu++11 -I ./lib -c Config0.c -lasiodnp3 -lasiopal -lopendnp3 -lopenpal -w -DSL_RP4
In these rows do I need to write modules from the boost library? There I can change the C++ version, for example to 20?
2. Is it possible to connect several devices to one COM port via ModBus RTU? If you create several slave devices with one COM port, will there be conflicts on the line? Is it possible to connect several devices with different IP addresses using ModBus TCP if there is one Ethernet port?
3. The editor has the option to enable the C extension. Are there any examples of using this feature? How does this extension interact with the main program?
Reply 1 0
thiagoralves
1. I never used the boost library, but yeah, that’s about how you add another library. The compile_program script control the whole compilation process
 
2. Several devices on the same COM port is only possible if you use an RS485 adapter. On TCP/IP you can connect as many devices as you want. TCP/IP is not dependent on the number of physical ports, otherwise internet would be unusable.
 
3. C extension is not working currently. I’m planning to replace that with an “Arduino Sketch” functionality.
Reply 0 0
Oleg_IT
Thanks for the quick response.
 
A small clarification on ModBus RTU. Who controls the exchange, is it synchronous or asynchronous? Does the request/response occur every program cycle? If so, then the exchange can significantly affect the cycle time, with a large number of subscribers. The same question applies to ModBus TCP.
Reply 0 0
thiagoralves
On OpenPLC, both Modbus master and slave are asynchronous. You can control the poll rate on Settings (web portal)
Reply 0 0
nestorlevi
1. I never used the boost library, but yeah, that’s about how you add another library. The compile_program script control the whole compilation process
 
2. Several devices on the same COM port is only possible if you use an RS485 adapter. On TCP/IP you can connect as many devices as you want. TCP/IP is not dependent on the number of physical ports, otherwise internet would be unusable.
 
3. C extension is not working currently. I’m planning to replace that with an “Arduino Sketch” functionality.
Arduino sketch is a great idea. Being able to use some Arduino libraries would give the system a lot of functionality.
Excellent work
Reply 0 0
thiagoralves
I did it! Update your editors and check out the new Arduino extension feature 🙂
Reply 1 0
Reply