LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP

Hello 

i have still the problem my Modbus communication has every week an Error. I have connected my SMA Converter with my home network and read data from it. I try to write a program flow if the Error at the communication "Close Port -> WAIT 10 sec. -> Open Port." But i have still the same problem. I can only solve this problem when i close the LabView Program and start again.

The program is in LV2019 32 BIT 

 

Error 1 occurred at ??? in TCP Master.lvclass:Protocol Write.vi:6190001->IP Data Unit.lvclass:Write ADU Packet.vi:1820001->Modbus Master.lvclass:Read Holding Registers.vi:2420001->_MAIN_Haus.vi
LabVIEW: (Hex 0x1) Ungültiger Eingangsparameter. Wenn am Eingang beispielsweise ein Pfad anliegt, kann dieser Pfad Zeichen wie ? oder @ enthalten, die im betreffenden Betriebssystem nicht zulässig sind.
=========================
Dieser Befehl ist nur verwendbar, wenn der GPIB-Controller der aktive Controller ist.

Download All
0 Kudos
Message 1 of 6
(896 Views)

Hi Michael,

 


@MichaelMoerix wrote:

Error 1 occurred at ??? in TCP Master.lvclass:Protocol Write.vi:6190001->IP Data Unit.lvclass:Write ADU Packet.vi:1820001->Modbus Master.lvclass:Read Holding Registers.vi:2420001->_MAIN_Haus.vi
LabVIEW: (Hex 0x1) Ungültiger Eingangsparameter.


Where exactly does the error occur?

Which Modbus function raises the error?

Are all inputs for that function really valid?

 

Why are there local variables visible in the image? Are you sure there is no race condition?

 

And please keep in mind: we cannot debug/run/edit images with LabVIEW…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(878 Views)

The function works nearly a week without Error. All Ports are valid it works. But mostly on Sunndy the first VI occure the Error. The local variable implement the IP Adress from the SMA Inverter.

Stupid is i can only reset the error if i close the complete program and restart. with new initialisation Close Open the port it is still the same error.

 

0 Kudos
Message 3 of 6
(860 Views)

Hi Michael,

 

how often to you open and close the TCP port?

(In case "more than once per EXE run" then I might ask: why more than once?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(858 Views)

normally at once if i start the program i open and if i stop the program i close. But if my error occure i try to close and open new the port.

0 Kudos
Message 5 of 6
(849 Views)

Has anyone an idea ?

 

0 Kudos
Message 6 of 6
(783 Views)