Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Problems to compile FORTE+Modbus
Problems to compile FORTE+Modbus [message #1816300] Fri, 25 October 2019 15:24 Go to next message
herbert leitão is currently offline herbert leitãoFriend
Messages: 1
Registered: October 2019
Junior Member
Hello 4diac Team,

I have tried to compile FORTE+Modbus from forte-incubation_1.11.0 but the process stops and the log shows 2 errors (see log.txt attached).

Best Regards,

Herbert Leitão
  • Attachment: log.txt
    (Size: 16.31KB, Downloaded 41 times)
Re: Problems to compile FORTE+Modbus [message #1816471 is a reply to message #1816300] Tue, 29 October 2019 19:13 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Hi,

I haven't used modbus in a very long time. We are also working on replacing this implemetnation with a new one. Please see our gerrit [1] for the first patches. Regarding your problem have you seen the comment in the old issue tracker [2]?

[1] https://git.eclipse.org/r/#/q/status%3Aopen+project%3A4diac/org.eclipse.4diac.forte
[2] https://sourceforge.net/p/fordiac/issues/1081/
Re: Problems to compile FORTE+Modbus [message #1817295 is a reply to message #1816300] Wed, 20 November 2019 05:07 Go to previous messageGo to next message
jagadish kavalath is currently offline jagadish kavalathFriend
Messages: 2
Registered: November 2019
Junior Member
Hi ,

I am facing build errors with modbus enabled in FORTE. Please help if there is any update on this issue


=======================================================================
[ 95%] Building CXX object src/CMakeFiles/FORTE_LITE.dir/modules/modbus/modbuslayer.cpp.o
In file included from /home/user/4diac/forte/src/modules/modbus/modbusclientconnection.h:16:0,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:14:
/home/user/4diac/forte/src/modules/modbus/modbustimedevent.h:45:16: error: field 'm_oStartTime' has incomplete type 'SForteTime'
SForteTime m_oStartTime;
^~~~~~~~~~~~
In file included from /home/user/4diac/forte/src/core/../arch/../core/extevhan.h:17:0,
from /home/user/4diac/forte/src/core/../arch/timerha.h:17,
from /home/user/4diac/forte/src/core/monitoring.h:22,
from /home/user/4diac/forte/src/core/utils/../resource.h:21,
from /home/user/4diac/forte/src/core/utils/../device.h:16,
from /home/user/4diac/forte/src/core/utils/extevhandlerhelper.h:17,
from /home/user/4diac/forte/src/core/cominfra/comlayer.h:21,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.h:16,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:12:
/home/user/4diac/forte/src/core/../arch/../core/devexec.h:19:8: note: forward declaration of 'struct SForteTime'
struct SForteTime;
^~~~~~~~~~
In file included from /home/user/4diac/forte/src/modules/modbus/modbusclientconnection.h:16:0,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:14:
/home/user/4diac/forte/src/modules/modbus/modbustimedevent.h:46:16: error: field 'm_oUpdateInterval' has incomplete type 'SForteTime'
SForteTime m_oUpdateInterval;
^~~~~~~~~~~~~~~~~
In file included from /home/user/4diac/forte/src/core/../arch/../core/extevhan.h:17:0,
from /home/user/4diac/forte/src/core/../arch/timerha.h:17,
from /home/user/4diac/forte/src/core/monitoring.h:22,
from /home/user/4diac/forte/src/core/utils/../resource.h:21,
from /home/user/4diac/forte/src/core/utils/../device.h:16,
from /home/user/4diac/forte/src/core/utils/extevhandlerhelper.h:17,
from /home/user/4diac/forte/src/core/cominfra/comlayer.h:21,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.h:16,
from /home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:12:
/home/user/4diac/forte/src/core/../arch/../core/devexec.h:19:8: note: forward declaration of 'struct SForteTime'
struct SForteTime;
^~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'unsigned int forte::com_infra::CModbusComLayer::convertDataInput(void*, unsigned int, TForteUInt16*)':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:67:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:73:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:79:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:85:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:92:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:98:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt16) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:104:43: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteWord) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:111:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteInt32) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:117:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt32) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:123:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteDWord) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:129:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteFloat) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:136:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteInt64) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:142:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteUInt64) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:148:44: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteLWord) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:154:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
outLength += sizeof(TForteDFloat) / 2;
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'virtual forte::com_infra::EComResponse forte::com_infra::CModbusComLayer::processInterrupt()':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:177:39: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(bool);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:181:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteInt8);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:185:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteInt16);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:189:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteInt32);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:193:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteInt64);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:197:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteUInt8);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:201:47: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteUInt16);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:205:47: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteUInt32);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:209:47: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteUInt64);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:213:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteByte);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:217:45: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteWord);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:221:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteDWord);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:225:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteLWord);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:229:46: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteFloat);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:233:47: warning: conversion to 'unsigned int' from 'long unsigned int' may alter its value [-Wconversion]
dataIndex += sizeof(TForteDFloat);
^
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'virtual forte::com_infra::EComResponse forte::com_infra::CModbusComLayer::openConnection(char*)':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:363:92: error: no matching function for call to 'CModbusClientConnection::CModbusClientConnection(CModbusHandler&)'
m_pModbusConnection = new CModbusClientConnection(getExtEvHandler<CModbusHandler>());
^
In file included from /home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:14:0:
/home/user/4diac/forte/src/modules/modbus/modbusclientconnection.h:35:14: note: candidate: CModbusClientConnection::CModbusClientConnection(CModbusHandler*)
explicit CModbusClientConnection(CModbusHandler* pa_modbusHandler);
^~~~~~~~~~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbusclientconnection.h:35:14: note: no known conversion for argument 1 from 'CModbusHandler' to 'CModbusHandler*'
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:382:95: warning: conversion to 'TForteUInt32 {aka unsigned int}' from 'long int' may alter its value [-Wconversion]
static_cast<CModbusClientConnection*>(m_pModbusConnection)->addNewPoll(commonParams.m_nPollFrequency, commonParams.m_nFuncCode, commonParams.m_nReadStartAddress[i], commonParams.m_nReadNrAddresses[i]);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'int forte::com_infra::CModbusComLayer::processClientParams(char*, forte::com_infra::CModbusComLayer::STcpParams*, forte::com_infra::CModbusComLayer::SRtuParams*, forte::com_infra::CModbusComLayer::SCommonParams*)':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:566:24: warning: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Wconversion]
int paramLen = strlen(readAddresses);
~~~~~~^~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:589:20: warning: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Wconversion]
paramLen = strlen(writeAddresses);
~~~~~~^~~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'int forte::com_infra::CModbusComLayer::findNextStartAddress(const char*, int)':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:647:25: warning: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Wconversion]
int strLength = strlen(&pa_acParam[pa_nStartIndex]);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:652:35: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
return pch - &pa_acParam[0] + 1;
~~~~~~~~~~~~~~~~~~~~~^~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp: In member function 'int forte::com_infra::CModbusComLayer::findNextStopAddress(const char*, int)':
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:661:25: warning: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Wconversion]
int strLength = strlen(&pa_acParam[pa_nStartIndex]);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:667:38: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
return pchDot - &pa_acParam[0] + 2;
~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/user/4diac/forte/src/modules/modbus/modbuslayer.cpp:671:38: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
return pchDot - &pa_acParam[0] + 2;
~~~~~~~~~~~~~~~~~~~~~~~~^~~
src/CMakeFiles/FORTE_LITE.dir/build.make:11390: recipe for target 'src/CMakeFiles/FORTE_LITE.dir/modules/modbus/modbuslayer.cpp.o' failed
make[2]: *** [src/CMakeFiles/FORTE_LITE.dir/modules/modbus/modbuslayer.cpp.o] Error 1
CMakeFiles/Makefile2:177: recipe for target 'src/CMakeFiles/FORTE_LITE.dir/all' failed
make[1]: *** [src/CMakeFiles/FORTE_LITE.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
user@user-OptiPlex-3050:~/4diac/forte/bin/posix$
Re: Problems to compile FORTE+Modbus [message #1818052 is a reply to message #1817295] Wed, 04 December 2019 20:34 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
It looks like that the modbus module has not been used in a long time. I also think that with one of the next release we will remove this implementation and replace it with the new one which currently sits in Gerrit [1]. Unfortunately I havent found time to do all the paper work and review needed. Also there exist an example based on the new modbus module showing how it can be used to access Festo drives via modbus with the new modular IO concept [2].

[1] https://git.eclipse.org/r/139743
[2] https://git.eclipse.org/r/139744
Re: Problems to compile FORTE+Modbus [message #1818066 is a reply to message #1818052] Thu, 05 December 2019 05:44 Go to previous messageGo to next message
jagadish kavalath is currently offline jagadish kavalathFriend
Messages: 2
Registered: November 2019
Junior Member
Hi Alois Zoitl,

I have tried to apply the patch and build, Looks like there are build issues in modbus-ng.

Applied the following patches on the head branch and enabled FORTE_IO_MODBUS.

[1] git fetch https://git.eclipse.org/r/4diac/org.eclipse.4diac.forte refs/changes/43/139743/3 && git checkout FETCH_HEAD
[2] git fetch https://git.eclipse.org/r/4diac/org.eclipse.4diac.forte refs/changes/44/139744/2 && git checkout FETCH_HEAD

======================================
[ 61%] Building CXX object src/CMakeFiles/FORTE_LITE.dir/modules/modbus-ng/slave/slave.cpp.o
cd /home/user/4diac/forte-patch3/forte/bin/posix/src && /usr/bin/c++ -DFORTE_COMPILATION -DFORTE_ENABLE_GENERATED_SOURCE_CPP -DFORTE_SUPPORT_ARRAYS -DFORTE_SUPPORT_BOOT_FILE -DFORTE_SUPPORT_CUSTOM_SERIALIZABLE_DATATYPES -DFORTE_SUPPORT_MONITORING -DFORTE_SUPPORT_QUERY_CMD -DFORTE_UNICODE_SUPPORT -DFORTE_USE_64BIT_DATATYPES -DFORTE_USE_LREAL_DATATYPE -DFORTE_USE_REAL_DATATYPE -DFORTE_USE_WSTRING_DATATYPE -DLOGDEBUG -I/home/user/4diac/forte-patch3/forte/bin/posix/src_gen -I/home/user/4diac/forte-patch3/forte/bin/posix -I/home/user/4diac/forte-patch3/forte/src/. -I/home/user/4diac/forte-patch3/forte/src/stdfblib/events -I/home/user/4diac/forte-patch3/forte/src/stdfblib -I/home/user/4diac/forte-patch3/forte/src/modules/opc_ua -I/home/user/4diac/forte-patch3/forte/src/modules/modbus-ng -I/home/user/4diac/forte-patch3/forte/src/modules/mqtt_paho -I/home/user/4diac/forte-patch3/forte/src/core/utils -I/home/user/4diac/forte-patch3/forte/src/core/datatypes -I/home/user/4diac/forte-patch3/forte/src/core/cominfra -I/home/user/4diac/forte-patch3/forte/src/core -I/home/user/4diac/forte-patch3/forte/src/arch/posix -I/home/user/4diac/forte-patch3/forte/src/arch -g -W -Wall -Wextra -Woverloaded-virtual -Wconversion -Wshadow -DFORTE_LITTLE_ENDIAN -fno-rtti -fno-exceptions -std=c++11 -o CMakeFiles/FORTE_LITE.dir/modules/modbus-ng/slave/slave.cpp.o -c /home/user/4diac/forte-patch3/forte/src/modules/modbus-ng/slave/slave.cpp
/home/user/4diac/forte-patch3/forte/src/modules/modbus-ng/slave/slave.cpp:15:30: fatal error: processinterface.h: No such file or directory
#include "processinterface.h"
^
compilation terminated.
src/CMakeFiles/FORTE_LITE.dir/build.make:2681: recipe for target 'src/CMakeFiles/FORTE_LITE.dir/modules/modbus-ng/slave/slave.cpp.o' failed
make[2]: *** [src/CMakeFiles/FORTE_LITE.dir/modules/modbus-ng/slave/slave.cpp.o] Error 1
make[2]: Leaving directory '/home/user/4diac/forte-patch3/forte/bin/posix'
CMakeFiles/Makefile2:181: recipe for target 'src/CMakeFiles/FORTE_LITE.dir/all' failed
make[1]: *** [src/CMakeFiles/FORTE_LITE.dir/all] Error 2
make[1]: Leaving directory '/home/user/4diac/forte-patch3/forte/bin/posix'
Makefile:130: recipe for target 'all' failed
make: *** [all] Error 2
===================================================================

Is there something I am missing?

Thanks
Re: Problems to compile FORTE+Modbus [message #1818609 is a reply to message #1818066] Fri, 20 December 2019 14:11 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
I have the same problem as yours
Re: Problems to compile FORTE+Modbus [message #1818642 is a reply to message #1818609] Sat, 21 December 2019 11:56 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
I fixed it by setting FORTE_IO enabled
Re: Problems to compile FORTE+Modbus [message #1818656 is a reply to message #1818642] Sun, 22 December 2019 08:47 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
but we can't find the FBs of ModuleBus, and ModuleBusAdapter
Re: Problems to compile FORTE+Modbus [message #1818714 is a reply to message #1818656] Tue, 24 December 2019 11:55 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Thanks for the hint. I'll try to fix that in the cmake setup for modbus_ng in the near future. As this is work in progress and an early stage I fear we don't have that fbs yet. However with the information given in the cpp files you can reconsruct the FBs and adapters for 4diac IDE as SIFB rather easily.
Re: Problems to compile FORTE+Modbus [message #1821635 is a reply to message #1817295] Tue, 18 February 2020 02:08 Go to previous messageGo to next message
rellik cheng is currently offline rellik chengFriend
Messages: 1
Registered: February 2020
Junior Member
Hi, I have the same error with you, how about your status? have you fixed it?


error: field 'm_oStartTime' has incomplete type 'SForteTime'
SForteTime m_oStartTime;


I searched the whole src directory, but I cannot find the struct SForteTime, so I guess this defination file is missing.

Where can I get it?
Re: Problems to compile FORTE+Modbus [message #1821792 is a reply to message #1821635] Thu, 20 February 2020 08:47 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
yes, i modified it(SForte) , it seems to be a uint64 format, the exact type i can't remember it quite clear.
there are one or two minor problems, just modify the source code then will be ok
Re: Problems to compile FORTE+Modbus [message #1821834 is a reply to message #1821792] Thu, 20 February 2020 20:44 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Would you mind pushing that change back to the public repo?
Re: Problems to compile FORTE+Modbus [message #1821838 is a reply to message #1821834] Fri, 21 February 2020 00:10 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
actully, i worked base on the older version of 1.10 version, with 1.11 version there are many imcompliant problems with the modulebus module,
because of the intreval calculation&update(separate for different devices, i didn't check it carefully) way had changed in 1.11 version. so if i have time, maybe i can try on the latest version

[Updated on: Fri, 21 February 2020 00:11]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1821917 is a reply to message #1821838] Sat, 22 February 2020 21:52 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
This would be great.
Re: Problems to compile FORTE+Modbus [message #1822737 is a reply to message #1821917] Thu, 12 March 2020 14:17 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey Joy

How did you solved the problem with CTimerHandler::sm_poFORTETimer->getForteTime();? modbustimedevent.cpp::46

And also for the new CModbusClientConnection(getExtEvHandler<CModbusHandler>()); ? modbuslayer.cpp:: 363

regards
Paulo
Re: Problems to compile FORTE+Modbus [message #1822742 is a reply to message #1822737] Thu, 12 March 2020 15:06 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

Ok i changed to branch 1.10.3 and modified the sm_poFORTETimer to smFORTETimer and the CModbusClientConnection(getExtEvHandler<CModbusHandler>()) to CModbusClientConnection(&getExtEvHandler<CModbusHandler>()).

Now the code compiles. Will need to test and see if it works or not.
Re: Problems to compile FORTE+Modbus [message #1822752 is a reply to message #1822742] Thu, 12 March 2020 21:43 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Would you be able to perform this fixes on the latest version and upstream them?
Re: Problems to compile FORTE+Modbus [message #1822757 is a reply to message #1822752] Fri, 13 March 2020 02:28 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
acutully, i think maybe the default modbus module is not so perfect,
if there is only one modbus reading in one resource, that's ok, if there are many, you have to consider the cocurrent problem for modbus reading, so i suggest programming(read and write ) with libmodbus by youself with mutiple slaves in the same FB(leave enough time for each reading/writing),
but also thanks to the original modbus contribution, that saves a lot time.
i would like to contribute but now it is not standard for product and the stable need to be verified by time.
Re: Problems to compile FORTE+Modbus [message #1822758 is a reply to message #1822757] Fri, 13 March 2020 02:30 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
@Paulo LouroFriend
Sorry didn't see your post till now.But good thing is i think you have finished it.
Re: Problems to compile FORTE+Modbus [message #1822763 is a reply to message #1822758] Fri, 13 March 2020 07:02 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

I have managed to compile it, but there is something wrong with it. I doesnt manage to open the TCP connection, but in very rare cases it opens the connection but doesnt pull any registers/coils.

@Alois: the changes i made were on 1.10.3. I dont think i will manage to make the same changes on the develop branch as there are alot of changes in the code, and I do not understand so much C++ code nor how the FORTE code is linked all together.

Re: Problems to compile FORTE+Modbus [message #1822765 is a reply to message #1822752] Fri, 13 March 2020 08:19 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
I provide the bug fixing both modbus and RS232 with posix based on forte 1.11.0(latest version), there is no warranty, just for you information
Re: Problems to compile FORTE+Modbus [message #1822766 is a reply to message #1822765] Fri, 13 March 2020 08:26 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
would it be possible that you provided it following the contribution rules of eclipse as summarized by Jose in this documentation [1].

P.S. This is open source it always comes without warranty ;-)

[1] https://www.eclipse.org/4diac/en_help.php?helppage=html/development/contributeToForte.html
Re: Problems to compile FORTE+Modbus [message #1822768 is a reply to message #1822766] Fri, 13 March 2020 08:34 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
Mr. Zoitl, as you said this, i'm a little worried about this product, kidding :-),
it's really an amazing product, thank you and your team's contribution and help.
i will check the document, and try to test it carefully then upload
Re: Problems to compile FORTE+Modbus [message #1822773 is a reply to message #1822768] Fri, 13 March 2020 09:56 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
I just checked out 1.11.0 and overwritten the files Joy send on 7zip, the project compiles but i'm getting an CModbusComLayer:: Invalid input parameters. Has something changed there? I'm using modbus[192.168.245.1:502:2000:3:1:0..3]
Re: Problems to compile FORTE+Modbus [message #1822776 is a reply to message #1822773] Fri, 13 March 2020 10:25 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
modbus[rtu:/dev/ttyS0:115200:N:8:1:200:2:1:0..15:0]

use cutecom to get the device id which connect to 485, and also pay attention to braute rate the same as the IO device

[Updated on: Fri, 13 March 2020 11:51]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822777 is a reply to message #1822776] Fri, 13 March 2020 10:35 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Oh but I want to use TCP/IP modbus not Serial
Re: Problems to compile FORTE+Modbus [message #1822780 is a reply to message #1822777] Fri, 13 March 2020 11:53 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
tcpi/ip i didn't use that, but i think it should work, for it calls libmodbus
modbus[127.0.0.1:502:2000:3:1:0..3]
plz read document
https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/modbus.html

[Updated on: Fri, 13 March 2020 11:54]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822783 is a reply to message #1822780] Fri, 13 March 2020 12:22 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

Yes there was something missing on my connection string. Now i'm using modbus[192.168.245.1:502:200:2:1:0..15:0] and the processClientParams is return 0 as expected.

But now i'm getting a coredump just after calling m_pModbusConnEvent->activate(); modbusclientconnection.cpp::78
Re: Problems to compile FORTE+Modbus [message #1822784 is a reply to message #1822783] Fri, 13 March 2020 12:56 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
function code can be set 3, different I/O devices behaviors little difference, you can try it,
i suggest maybe you install codelite or codeblocks and write a simple read functionality with libmodbus library, that makes debugging easier
  • Attachment: main.cpp
    (Size: 1.62KB, Downloaded 23 times)

[Updated on: Fri, 13 March 2020 13:00]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822787 is a reply to message #1822784] Fri, 13 March 2020 14:20 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
I traced the coredump to

Thread 5 "forte" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff526f700 (LWP 12164)]
0x00005555556b59da in CTimerHandler::getForteTime (this=0x0) at /home/test/Downloads/forte/src/core/../arch/timerha.h:88
88 return mForteTime;
Re: Problems to compile FORTE+Modbus [message #1822788 is a reply to message #1822787] Fri, 13 March 2020 14:28 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
can you give us the line calling this method. Becaus the this pointer is 0. This means that the getHandler method is not correctly used. I would assume that the handler is not correctly registered. This was introduced in 1.11
Re: Problems to compile FORTE+Modbus [message #1822789 is a reply to message #1822788] Fri, 13 March 2020 14:32 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
modbustimedevent.cpp: like 35.

It crashs after calling the getForteTime;

void CModbusTimedEvent::activate(){
m_oStartTime = CTimerHandler::smFORTETimer->getForteTime();
m_bIsStarted = true;

}

This is also changed in the modbuslayer.cpp:: 392

CModbusHandler& handler = getExtEvHandler<CModbusHandler>();
CModbusHandler* h = &handler;

m_pModbusConnection = new CModbusClientConnection(h);

[Updated on: Fri, 13 March 2020 14:33]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822790 is a reply to message #1822789] Fri, 13 March 2020 14:42 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Have you added the DECLARE_HANDLER and DEFINE_HANDLER to CModbusHandler and added the handler with forte_add_handler in the according CMakeList.txt? You can hae a look at the serial handler for reference.
Re: Problems to compile FORTE+Modbus [message #1822792 is a reply to message #1822790] Fri, 13 March 2020 14:49 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

Yes its declared in modbushandler.h and defined in modbuslayer.cpp. Also forte_add_handler(CModbusHandler modbushandler) in the CmakeLists.txt.

Can it be a problem related with the smFORTETimer that hasnt been initialized.

Searching the code only 4 results are found, see picture
  • Attachment: Untitled.png
    (Size: 26.61KB, Downloaded 21 times)

[Updated on: Fri, 13 March 2020 14:53]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822793 is a reply to message #1822792] Fri, 13 March 2020 14:57 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
smFORTETimer is gone for good. If you still have one than something is really wrong.
Re: Problems to compile FORTE+Modbus [message #1822794 is a reply to message #1822793] Fri, 13 March 2020 14:59 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Yes thats the changes Joy has made.

Is there a better way to get the time from the system?
Re: Problems to compile FORTE+Modbus [message #1822796 is a reply to message #1822794] Fri, 13 March 2020 15:10 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
As I haven't looked into the modbus code for a very long time and as it is not from me I don't know wht time you need. But since 1.11.0 we offer a mthod: getNanoSecondsMonotonic(). Maybe this solves your problems.
Re: Problems to compile FORTE+Modbus [message #1822797 is a reply to message #1822796] Fri, 13 March 2020 15:16 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Thats it, now its working. I will try to revert back to develop branch and make the same changes, to see if it compiles and works.
Re: Problems to compile FORTE+Modbus [message #1822798 is a reply to message #1822796] Fri, 13 March 2020 15:31 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
@Paulo LouroFriend
it worked in 1.10 , then i didn't use this modbus module but program it myself, then upgrade it to 1.11.0, i remember the smFORTETimer principle in 1.11 was difference with 1.10,

in 1.10 smFORTETimer is a static variable created in CDeviceExecution, but there is not any more in 1.11, so why i said it worked in 1.10, the timer princple is totally different.
1.10:
CDeviceExecution::CDeviceExecution(){
memset(mRegisteredEventHandlers, 0, sizeof(SEventHandlerElement) * cg_unNumberOfHandlers);

CDeviceExecution::createHandlers(*this);

getTimer().enableHandler();
if(0 == CTimerHandler::smFORTETimer){
CTimerHandler::smFORTETimer = &getTimer(); //used for develog, CIEC_TIME() and in Modbus
}
}
1.11 not exist

i will check it tommrow, it's too late here

[Updated on: Fri, 13 March 2020 15:31]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822799 is a reply to message #1822797] Fri, 13 March 2020 15:36 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Paulo Louro wrote on Fri, 13 March 2020 15:16
Thats it, now its working. I will try to revert back to develop branch and make the same changes, to see if it compiles and works.

If it works there es well please provide a patch so that we have some working modbus version.
Re: Problems to compile FORTE+Modbus [message #1822800 is a reply to message #1822797] Fri, 13 March 2020 15:42 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Ok i checked out develop branch and made the changes for getNanoSecondsMonotonic(), it compiles but didnt work. Or better didnt connect to the modbus server. So I moved some of the files in the modbus module Joy sent on the 7zip and manage to get it working again.

Now the next step is to revert some of the changes Joy made that are not needed and try to understand better what has he changed to make it work. From his files i only used the ones inside the modbus, so no other changes were made outside this module. I have not tests the modbus serial so maybe some other changes outside modbus module, sent by Joy, also need to be evaluated and tested.

Will keep you posted later today or during the weekend.
Re: Problems to compile FORTE+Modbus [message #1822802 is a reply to message #1822800] Fri, 13 March 2020 15:48 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Thanks for your patience and your support.
Re: Problems to compile FORTE+Modbus [message #1822815 is a reply to message #1822800] Fri, 13 March 2020 23:09 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
I have compared the source code, just recover the smFORTETimer part source code is ok to read result. and i don't know if you have more than one slave,
if you put more than one client FB, then it will cause the concurrent problem,
because the modbus is not full-duplex and you should leave duration to let the read operation to be finished.
so i think there are two options for you, the simplest one is program it yourself,
because the default modbus module did the most of the work, just new
a custom FB and , and create the read/write logic by seqence, i use CThread::sleepThread(35); between the slaves reading.
the second option is in a old post on this forum, ng-modbus, its for tcp/ip,
mine is rtu, so i didn't use it, maybe you can try.
  • Attachment: devexec.cpp
    (Size: 2.66KB, Downloaded 17 times)
Re: Problems to compile FORTE+Modbus [message #1822819 is a reply to message #1822815] Sat, 14 March 2020 09:14 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Thanks Joy.

I can see the problem and understand it.

Anyways its connecting to the server, sending the request, the server responds but the Client FB doesnt output any values via the RD_1 output.

Also there is another problem, or better, missing function to write to the modbus slave. Only function 1,2,3,4 that are read functions are implemented...

Where can i find the modbus-ng implementation?



Re: Problems to compile FORTE+Modbus [message #1822820 is a reply to message #1822819] Sat, 14 March 2020 10:58 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 151
Registered: May 2019
Senior Member
the parameter 0:15, that means we want to read 16 inputs value, that's according to your device, it should keep the same, if you only have 8 inputs but read 16, that also can't get correct result.
i only tested function code 3 and 2, function 3 with my device return 16bit number, i have to use a custom FB to convert to value, such as:
V1() = Registers() & 1;
V2() = Registers() & 2;
V3() = Registers() & 4;
V4() = Registers() & 8;
V5() = Registers() & 16;
V6() = Registers() & 32;
V7() = Registers() & 64;
V8() = Registers() & 128;
V9() = Registers() & 256;
V10() = Registers() & 512;
V11() = Registers() & 1024;
V12() = Registers() & 2048;
V13() = Registers() & 4096;
V14() = Registers() & 8192;
V15() = Registers() & 16384;
V16() = Registers() & 32768;
if you use function 2, i copied Client_1 to Client_16 and add other 15 RD_1.。。RD_15,
then could see the input values.

function code 1 can read single input value.
modbus-ng
https://www.eclipse.org/forums/index.php?t=msg&th=1101083&goto=1818052&#msg_1818052
before you use this, you have to create a custom fb according to the source code. there is no template so far

Re: Problems to compile FORTE+Modbus [message #1822874 is a reply to message #1822820] Mon, 16 March 2020 09:27 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

I managed to get the modbus-ng source from the link you provided, compile it and made an basic interface for the modbus slave, then i configured it and download it to forte. It was a success, it managed to connect and request the MODBUS simulator the vendor name, product code and majorminor versions. Now the next question is, how do i map the modbus to the IO blocks?
Re: Problems to compile FORTE+Modbus [message #1822884 is a reply to message #1822874] Mon, 16 March 2020 11:16 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
hey these are great news. i really have to fix it and get it into the main git.

the idea of the new IO infrastructure is that the names you give the IO blocks are mapped to the IOs provide by the fieldbusses/IO subsystem. Therefore we can now separate better between IO configuration and application needs.

Your IO FBs for mod-bus should have a string input for each IO value they provide. Here you can specifiy the name of the IO FB used in your FB. During initialisation it should lead to an automatic mapping.
Re: Problems to compile FORTE+Modbus [message #1822955 is a reply to message #1822884] Tue, 17 March 2020 10:48 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey Alois.

Can you share an example? I'm not sure i understand exactly what i need todo.
Re: Problems to compile FORTE+Modbus [message #1822969 is a reply to message #1822955] Tue, 17 March 2020 13:19 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

I found that there was an BusAdapter inside the modbus-ng. So I have made some changes but i'm unsure if this is correct. It also gives and error downloading the code, since I have added the BusAdapter to the XI FB. See picturehttps://files.fm/down.php?i=u2zkmhe9
Re: Problems to compile FORTE+Modbus [message #1822976 is a reply to message #1822969] Tue, 17 March 2020 13:43 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Small correction to the BusAdapter, needs to be called BusAdaoterOut.

https://files.fm/down.php?i=9xtvcg2m

[Updated on: Tue, 17 March 2020 13:46]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1822989 is a reply to message #1822976] Tue, 17 March 2020 16:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Ah sorry for the little explanation. As this is a new concept we are still working on ramping stuff up.

i don't have the modbus fbs but I tried to show an example with the EMBrick system which works similar.

So first of all we have the IO System configuration separated from the IO usage. You can see this in my attached image with the bottom part a resource in my device where I configure the available physical IOs. The bus master defines things like the port, the scan cycle, etc. With the adapter connection you can specify which IO modules are connected on the bus. In my case the first IO module is a 8 digital in 8 digital output module. You can have more of these IO module FBs daisy chained. With that you tell the bus master what IO modules to expect and what data to read.

In your application (top part in my screenshot) you use the IO FBs that you are used to (e.g., IX, QX, IW). The big difference is that you are not useing the params input anymore. With the instance name of the FB you specifiy a symbolic name of your IO in the application.

In order to link both parts together you now have to give at the inputs of your IO module FB the according name. you can see this in my figure where i mapped the IX block SensorIn to the digital input #4 of my IO module and the QX block LED to the Digtial output 6.

I hope this clarifies a few things.

index.php/fa/37603/0/
Re: Problems to compile FORTE+Modbus [message #1822994 is a reply to message #1822989] Tue, 17 March 2020 18:05 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey Alois,

This makes alot more sense now. Thanks for the example.

Anyways I'm able to make the ModbusMaster FB, but looks like the code in FORTE is missing the ModbusSlave. If i look into the source file the Slave.h and cpp doesnt have the declaration like the Master.h file, defining the inputs and outputs of the FB. When uploading the code to the FORTE it complains that the FB doesnt exists.

<!-- 192.168.126.131:61499: ioConfig -->
<Request Action="CREATE" ID="14">
<FB Name="ModbusSlave" Type="ModbusSlave"/>
</Request>

<Response ID="14" Reason="UNSUPPORTED_TYPE"/>


I'm starting to think that Martin has defined the Modbus Slave on this https://git.eclipse.org/r/139744 merge request on not on the first one.
Re: Problems to compile FORTE+Modbus [message #1822998 is a reply to message #1822994] Tue, 17 March 2020 19:50 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
Hey Paulo,

I'm happy that this brought you forward. The slave FBs have to be specific for your device. Therefore the first patch doesn't have one. The second patch which you are mentioning contains as example a slave, namely a FESTo CMMP drive. You can use that as starting point for developing your own slave. However I must confess I haven't done that by myself either.
Re: Problems to compile FORTE+Modbus [message #1823046 is a reply to message #1822998] Wed, 18 March 2020 17:08 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey Alois

I managed to copy the files from Festo and create a Slave device, but I'm unsure if this configuration is done correctly. As the modules are saying "Waiting for initialization.."

Also FORTE is reporting [IOMapper] Register observer TEST


index.php/fa/37609/0/
  • Attachment: Untitled.png
    (Size: 78.81KB, Downloaded 157 times)

[Updated on: Wed, 18 March 2020 17:13]

Report message to a moderator

Re: Problems to compile FORTE+Modbus [message #1823056 is a reply to message #1823046] Wed, 18 March 2020 22:47 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1075
Registered: January 2014
Senior Member
This looks strange. Because the ModbusMaster should send events to the slave. however it could also be that the device needs to be addressed correctly. Maybe the code in the slave is very specific to the FEST CMMP drive. With what device do you like to communicate?
Re: Problems to compile FORTE+Modbus [message #1823081 is a reply to message #1823056] Thu, 19 March 2020 08:36 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey I'm using diagslave 3.2 - FieldTalk(tm) Modbus(R) Diagnostic Slave Simulator, that handles all message. I can see when i download the configuration to forte that the forte requests the diagslave some Vendor PRodCod etc.

What i think is really strange is the STATUS on the master saying waiting initialization and also that the Adapter is not being initialized.

validateMasterIpAddr: accepting connection from 192.168.126.135
Slave 0: readDeviceIdentification VendorName
Slave 0: readDeviceIdentification ProductCode
Slave 0: readDeviceIdentification MajorMinorRevision
Re: Problems to compile FORTE+Modbus [message #1823095 is a reply to message #1823081] Thu, 19 March 2020 13:23 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hey

I have been debugging and trying to understand how the FORTE code works. From my understanding the IOConfigFBMultiMaster::onStartup() is not being called. I'm unable to understand or find where this function shall be called.

Any ideas?
Re: Problems to compile FORTE+Modbus [message #1823115 is a reply to message #1823095] Thu, 19 March 2020 15:51 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi, just one thing.

can you paste the log information of FORTE here? Do you get any "[IOConfigFBMultiSlave] Found slave with incorrect type at position "

Regards,

Jose
Re: Problems to compile FORTE+Modbus [message #1823228 is a reply to message #1823115] Mon, 23 March 2020 09:23 Go to previous messageGo to next message
Paulo Louro is currently offline Paulo LouroFriend
Messages: 31
Registered: February 2020
Member
Hi

No i do not have any information about that.

I'm trying to get now emBrick working without the SPI and PIN access, but the result is very similar, nothing gets initialized, but maybe it has something with the under layer SPI being disabled and not returning a valid values.
Re: Problems to compile FORTE+Modbus [message #1823241 is a reply to message #1823228] Mon, 23 March 2020 12:53 Go to previous message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Can you paste the log anyway? You tried the FestoModbusSlave as it is or did you change something in it?

I just checked the SlaveFestoCMMP_AS and it has many more inputs than the FB you created, for example Warning, Fault, etc.
Previous Topic:How to do multidimensional array calculation ?
Next Topic:Error while Importing
Goto Forum:
  


Current Time: Thu Dec 03 18:02:56 GMT 2020

Powered by FUDForum. Page generated in 0.04715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top