Hi all,
I managed to build and compile the Class to handle Modbus protocol over TCP/IP on Windows(had to make some changes). I found this in Classes Catalogue on tango-controls.org website(http://www.tango-controls.org/resources/dsc/ds/318/). To compile this, I used vc11 Tango libraries and Visual Studio 2017(compiler vs2012) to create an exe file. Solution file is the one from trunk/src/vc10_proj folder and sources from trunk/src/
Wanted to point the strange behavior while running some of this device class commands (most of them). It usually throws an exception on first execution (Attachment)

To be able to build this on Windows, I only had to update project included files, so tango.h (vc11) was recognizable by the system and modify this in trunk/src/Modbus.cpp file:

//Line 52:
#ifdef LINUX
#include <unistd.h>
#endif
#ifdef WINDOWS
#include <windows.h>
#endif

//Line 1399:
for(int i = 0 ; i < numberOfRetry ; i++){
#ifdef LINUX
usleep(sleepBetweenRetry * 1000);
#endif
#ifdef WINDOWS
Sleep(sleepBetweenRetry);
#endif

What is more, I was always getting the error on device initialization which was telling me that : "Serialline property must be defnied for RTU protocol" even If my properties were defined as follows(exe compiled with NOSERIAL preprocessor definition):
Address 1
Iphost 127.0.0.1
Protocol TCP

So, I just temporarily commented out the first section from void Modbus::init_device() which was checking the case : strcasecmp( protocol.c_str() , "RTU" ) == 0 as I will use this Class only for TCP/IP communication. (It is just a temporary solution, not a good one). There also was a NOSERIAL preprocessor definition included in project settings.

To summarize, do you know about this "ModbusTCP: No error" exception on command execution which I attached and if is there a workaround for this? (I can use try/except on client side, but it is not a good solution as only some of my write requests end with success) Hope it's not just because of Windows system which might cause this behavior.

I tried to contact accelerator-control@esrf.fr but in the end I got:

sympa@esrf.fr
host mta1.epn-campus.eu [193.49.43.71]
SMTP error from remote mail server after RCPT TO:<sympa@esrf.fr>:
550 #5.1.0 Address rejected
Regards,
Jagoda
Edited 1 week ago