Input long JSON messages

Post Reply
gerard
Posts: 3
Joined: 18 Jul 2022, 12:09

Input long JSON messages

Post 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
Attachments
2.jpg
2.jpg (203.04 KiB) Viewed 7763 times
1.jpg
1.jpg (361.32 KiB) Viewed 7763 times
0.jpg
0.jpg (311.83 KiB) Viewed 7763 times
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Input long JSON messages

Post 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
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Input long JSON messages

Post by dirk »

Hi gerard have you thought about posting your question Codesys Forge?
https://forge.codesys.com/neighborhood
gerard
Posts: 3
Joined: 18 Jul 2022, 12:09

Re: Input long JSON messages

Post 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
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Input long JSON messages

Post by dirk »

Hi gerard, thanks for your positive feedback and good luck in the future.
Post Reply