SAPHIR - Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

No communication when executing vi with ModbusView over TCP as .exe file

Solved!
Go to solution

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

0 Kudos
Message 1 of 12
(10,342 Views)

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


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Message 2 of 12
(6,702 Views)

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.

Modbus Test.jpg

This is a picture of the vi. Maybe it helps you to to find the reason for this strange behaviour.

Marcus

Message 3 of 12
(6,703 Views)

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


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Download All
0 Kudos
Message 4 of 12
(6,703 Views)

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

0 Kudos
Message 5 of 12
(6,703 Views)

What is the modbus client used for your test ? Is it an application developed with LaVIEW or a device ?


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 6 of 12
(6,703 Views)

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.

0 Kudos
Message 7 of 12
(6,703 Views)

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

0 Kudos
Message 8 of 12
(6,703 Views)

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...) 2012-11-08_1630.png

This template is a more advanced implementation of a ModBus Server that wait for client connection continiously.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 9 of 12
(6,703 Views)
Solution
Accepted by topic author M_Schröder

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.  


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 10 of 12
(6,703 Views)