Home
osande
wiki
(WikiPage)
Project Members: osande (admin)
Last updated: 3 days ago
Post by osande on Archive
CODESYS Forge
talk
(Post)
Problem with Visualization Manager and archiving. Project without VM has no problem. With VM in the project there is an error message and no archive has been created
Last updated: 3 days ago
Post by osande on Archive
CODESYS Forge
talk
(Post)
V3.5 SP 21 Patch 5
Last updated: 3 days ago
Archive
CODESYS Forge
talk
(Thread)
Archive
Last updated: 3 days ago
wiki Discussion
ineffectua
wiki
(Discussion)
Forum for wiki comments
Last updated: 3 days ago
blog Discussion
ineffectua
blog
(Discussion)
Forum for blog comments
Last updated: 3 days ago
(no subject)
ineffectua
wiki
(Thread)
Last updated: 3 days ago
blog Discussion
darwin03
blog
(Discussion)
Forum for blog comments
Last updated: 3 days ago
Home
ineffectua
wiki
(WikiPage)
Project Members: ineffectua (admin)
Last updated: 3 days ago
wiki Discussion
darwin03
wiki
(Discussion)
Forum for wiki comments
Last updated: 3 days ago
(no subject)
darwin03
wiki
(Thread)
Last updated: 3 days ago
Home
darwin03
wiki
(WikiPage)
Project Members: darwin03 (admin)
Last updated: 3 days ago
Dynamically Update JSON Payload
CODESYS Forge
talk
(Thread)
Dynamically Update JSON Payload
Last updated: 3 days ago
Post by fredashbolt on Dynamically Update JSON Payload
CODESYS Forge
talk
(Post)
I am trying to generate a JSON payload populated with a value that updates for use with a telemetry system, the payload is to be published by MQTT. I have established the MQTT client and can publish a working JSON payload but I can't get the payload to update as the value (iValue) changes. I am using a timer to trigger the .SetValue function periodically, but the JSON will only give the value as it is when it is first initialized using xFirst IF statement. Any suggestions? Thanks VAR pJsonData : POINTER TO JSON.JSONData := factory.Create(); fb_JBuilder : JSON.JSONBuilder; diRootIndex, diObject1Index : DINT; iValue : INT := 10 ; jsonArrayWriter : JSON.JSONByteArrayWriter; wsJsonData : WSTRING(1000); xFirst : BOOL := TRUE; utf8JsonData : STRING(2000); diTempVal : DINT ; PublishTimer : TON ; END_VAR IF xFirst = TRUE THEN fb_JBuilder ( pJsonData := pJsonData , diRootObj => diRootIndex ) ; diObject1Index := fb_Jbuilder.SetKeyWithObject ( "Device" , diParentIndex := diRootIndex ) ; diTempVal := fb_Jbuilder.SetKeyWithValue ( "Temp" , iValue , diParentIndex := diObject1Index ) ; xFirst := FALSE ; END_IF PublishTimer ( IN := PublishTimer.Q = 0 , PT := T#5S ) ; IF PublishTimer.Q THEN fb_JBuilder.SetValue ( iValue , diTempVal ) ; END_IF jsonArrayWriter( xExecute := PublishTimer.Q , pwData := ADR(wsJsonData), udiSize := SIZEOF(wsJsonData), jsonData := pJsonData^, xAsyncMode := FALSE ) ; JSON.Stu.ConvertUTF16toUTF8( ADR ( wsJsonData ) , ADR ( utf8JsonData ) , SIZEOF ( utf8JsonData ) , bStrictConversion := TRUE ) ;
Last updated: 3 days ago
Home (version 1) discussion
ineffectua
wiki
(Thread)
Home (version 1) discussion
Last updated: 3 days ago
wiki Discussion
fredashbolt
wiki
(Discussion)
Forum for wiki comments
Last updated: 3 days ago
blog Discussion
fredashbolt
blog
(Discussion)
Forum for blog comments
Last updated: 3 days ago
Home
fredashbolt
wiki
(WikiPage)
Project Members: fredashbolt (admin)
Last updated: 3 days ago
(no subject)
fredashbolt
wiki
(Thread)
Last updated: 3 days ago
Home (version 1) discussion
fredashbolt
wiki
(Thread)
Home (version 1) discussion
Last updated: 3 days ago
Home (version 1) discussion
osande
wiki
(Thread)
Home (version 1) discussion
Last updated: 3 days ago
Post by infinitetool on No connection could be made because the target machine actively refused it
CODESYS Forge
talk
(Post)
Hi! I'm having trouble connecting to a device in Deploy Control SL. I'm able to see the device is available during a scan, and I can ping the device as well, but when I try to connect I get the message "No connection could be made because the target machine actively refused it". I've worked on this for hours including turning off the firewall on the device PC but nothing seems to work. The device is running a fresh install of Windows 11 IoT Enterprise 2024 and the Development System is 3.5.21.50 running on Windows 11. Thank you in advance for any ideas!
Last updated: 2 days ago
Post by ineffectua on WebClient result empty
CODESYS Forge
talk
(Post)
Since the request works correctly in the browser and returns the full JSON, it seems the API itself is fine. The issue might be related to how the WebClient is reading the response. Sometimes the response is received in chunks or requires waiting until the full content is available before parsing it. You might want to check if the WebClient is reading the complete stream or if there is a buffer/timeout run 3 setting that stops it too early.
Last updated: 2 days ago
Post by eschwellinger on No connection could be made because the target machine actively refused it
CODESYS Forge
talk
(Post)
if you try to login by a ssh client, does this work?
Last updated: 2 days ago
No connection could be made because the target machine actively refused it
CODESYS Forge
talk
(Thread)
No connection could be made because the target machine actively refused it
Last updated: 2 days ago