09-04-2013 06:08 AM
Hi,
I use ModbusView over TCP for the communication between a data acquisition system and a PLC. When I execute my vi under Labview 2011, the communication works. But when I make an .exe file out of this vi, so that I don´t have to start LabView to execute it, the communication does not work. What can be the reason for it? Is it a license problem? It would be nice if someone could help me.
Thanks,
Marcus
Solved! Go to Solution.
09-04-2013 09:17 AM
Hello Marcus,
As you cannot build an EXE without an activated license, I'm almost sure that there is no license problem.
Did your Modbus communication rely on a configuration file or other stuff which could execute differently from development environment or runtime ?
I would encourage you to do a small VI (the simplest one : open --> read or write on the PLC --> close). Test it in development environment and then in EXE. This could help to fix the issue.
Let me know how this works and we will see what is going wrong with this test VI.
Olivier
09-05-2013 04:33 AM
Hello Olivier,
I´ve made a small VI and tested it in the development environment and as an EXE. When I run the EXE there´s no communication an I get the error message "TCP Wait On Listener in ModBusVIEWoTCP.lvlib:MBVTCP_listenConnections.vi:1->Modbus Server Test.vi" with the error code 56.
This is a picture of the vi. Maybe it helps you to to find the reason for this strange behaviour.
Marcus
09-05-2013 05:27 AM
Hello Marcus,
This example is really closed to the simple modbus server example provided with the toolkit. When you execute it you wait connection in the second function. If there is no client connection during the 20s configured, this function exit with time out error (56). I assume that in development this function exit without error and with Network address output containing the IP address of your client. Did you run your EXE on the same computer than your working source code ? If not, did you have change connection settings of your client ?
I have attached a really simple project in LV2011 (Test.zip) and the 2 resulting EXE files. RunFirst.exe is almost the same server code than yours and RunSecond.exe is a client. Please run these 2 EXE on a same machine and tell me if it works fine.
Olivier
09-05-2013 05:46 AM
Hello Olivier,
the working source code and the EXE of my vi run on the same computer. I´ve run your two EXE on this computer and it works fine.
Marcus
09-05-2013 06:23 AM
What is the modbus client used for your test ? Is it an application developed with LaVIEW or a device ?
09-05-2013 06:42 AM
The modbus client is a computer with the HMI SCADA software "zenon supervisor" by COPADATA running on it. zenon provides the data for my vi.
09-05-2013 07:01 AM
Hello Olivier,
I tried to test the EXE of my small vi on the computer in my office (LabVIEW 2011, too). And it works! Could it be that there is a problem with the runtime of Labview 2011 installed on the computer where I have these problems?
Marcus
09-05-2013 07:09 AM
As I never used this product, please could you tell me if you can access "debug" information on the zenon supervisor side ? Did he show different information when you try to connect your test in dev or in EXE ?
The only thing that come in my minds by now is your client send his open connection and your EXE is not listening for connection yet.
To avoid that I would encourage you to use the server template provided with the toolkit (menu File>>New...)
This template is a more advanced implementation of a ModBus Server that wait for client connection continiously.
09-06-2013 01:50 AM
M_Schröder wrote:
Hello Olivier,
I tried to test the EXE of my small vi on the computer in my office (LabVIEW 2011, too). And it works! Could it be that there is a problem with the runtime of Labview 2011 installed on the computer where I have these problems?
Marcus
Hello Marcus, I'd be realy surprised that a problem on the runtime only prevent TCP/IP connection. As I said in my previous message, I would suspect a "synchronisation" issue.
One other path that could be explored is a problen of firewall or antivirus. the behavior could be diferent between LabVIEW and your EXE.