Page 1 of 1

Input long JSON messages

Posted: 02 Nov 2022, 09:59
by gerard
Hello,

I am programming an application using CODESYS CODESYS V3.5 SP18 Patch 2. The application must receive JSON messages of length 700 bytes using TCP/IP. But the application does not catch these messages. How can I solve that?
I attach my code (jpg).
Thank you

Re: Input long JSON messages

Posted: 04 Nov 2022, 11:36
by dirk
Hi gerard,
Your application sounds exciting. KUNBUS has no shares in application development via Codesys, so I can only help you to a limited extent.
If I were you, I would leave Codesys out for the moment and check if the data arrives at the RevPi.
You can execute the following command to enable an incoming connection on port 8080:

Code: Select all

ncat -l -p 3000 > /tmp/json.txt
On the sending device, you can run the following command:

Code: Select all

nc -w 3 <RevPi IP> 3000 < json.txt

Re: Input long JSON messages

Posted: 22 Nov 2022, 13:54
by dirk
Hi gerard have you thought about posting your question Codesys Forge?
https://forge.codesys.com/neighborhood

Re: Input long JSON messages

Posted: 30 Nov 2022, 17:42
by gerard
I checked that my application receives the JSON message sent from Hercules but not from other software. This problem occurs running the application on the RevPi and also with the Codesys virtual PLC.

I will post my question in the forum that you suggest, thank you very much

Re: Input long JSON messages

Posted: 06 Dec 2022, 08:43
by dirk
Hi gerard, thanks for your positive feedback and good luck in the future.