Activity for corriibme

  • corriibme corriibme modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    It turns out that you can build JSON structures without ever calling the JSONBuilder function block directly. Instead, create a pointer to JSON.JSONData and invoke the necessary methods on its dereference. The parent object has a parent index of -1 (and an index of 0). EVERY other item (including keys, values, empty arrays and sub-objects) created by the setX methods needs the index to increase by 1. Then use the JSONByteArrayWriter FB to generate your JSON string

  • corriibme corriibme posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    It turns out that you can build JSON structures without ever calling the JSONBuilder function block directly. Instead, create a pointer to JSON.JSONData and invoke the necessary methods on its dereference. The parent object has a parent index of -1 (and an index of 0). EVERY other item (including keys, values, empty arrays and sub-objects) created by the setX methods needs the index to increase by 1.

  • corriibme corriibme posted a comment on discussion Runtime πŸ‡¬πŸ‡§

    I have recently used this example from @Brine, and it worked. Thanks

  • corriibme corriibme posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    I have been trying to set an array value to a JSON structure of this form: {"key": [1,2,3,4]} While I have been able to create the key and set its value to an empty array, I've not had any luck in putting any value in that array. objindex:= fb_JBuilder.SetKeyWithArray("Key6", diParentIndex := diRootIndex); objindex2:= fb_JBuilder.SetValue(value:= iValue2, diParentIndex:= objindex); iValue2: ARRAY[0..3] OF INT:= [1,2,3,4]; The two lines of code above produce {"key6": []} . The second line essentially...

  • corriibme corriibme posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hello @florian, Could you please help with how to set an array value? I've been trying to use the with the setKeyWithArray method which creates the key with an empty array value. But I have been unable to set items in this array? objindex:= fb_JBuilder.SetKeyWithArray("Key6", diParentIndex := diRootIndex); objindex2:= fb_JBuilder.SetValue(value:= iValue2, diParentIndex:= objindexx); //iValue: array[0..n] of int; Best regards

  • corriibme corriibme posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    I am having the same problem right now. Could you please share more information if you were able to solve the problem?

  • corriibme corriibme posted a comment on discussion Forge πŸ‡¬πŸ‡§

    I'm having this problem with my Modbus TCP master program: a successful connection is made to the server, to be used to read a number of input registers in sequence by using the ModbusFB.ClientRequestReadInputRegisters function block. But although the xExecute input is being controlled by a clock signal which turns it ON and OFF cyclically, no ModbusTCP request has ever been sent onto the physical ethernet medium. At the same time, I get no Error or Exception messages from any ModbusTCP function...

  • corriibme corriibme posted a comment on discussion Forge πŸ‡¬πŸ‡§

    I'm having this problem with my Modbus TCP master program: a successful connection is made to the server, to be used to read a number of input registers in sequence by using the ModbusFB.ClientRequestReadInputRegisters function block. But although the xExecute input is being controlled by a clock signal which turns it ON and OFF cyclically, no ModbusTCP request has ever been sent onto the physical ethernet medium. At the same time, I get no Error or Exception messages from any ModbusTCP function...

  • corriibme corriibme posted a comment on discussion Forge πŸ‡¬πŸ‡§

    From the example program for ModbusTCP // Configure the MODBUS TCP client client(aIPaddr:=server.aIPaddr, udiLogOptions:=(ModbusFB.LoggingOptions.ClientConnectDisconnect OR ModbusFB.LoggingOptions.ClientReceivedValidReplies)); // Try to connect the client client(xConnect:=TRUE); After configuring and connecting the MBTCP client instance as shown, wouldn't a line like the following re-initialize the client object and terminate the connection? ...because it has just been stripped of the server's IP...

  • corriibme corriibme modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    It's my very first time with Modbus but I have worked with some other networking protocols before and programmed PLCs using all of Structured Text, FBD, and LAD. I have this ModbusTCP code to read the input registers of a connected device. The problem is that the request messages are not being sent (Wireshark does not record any traffic) even though the xExecute input of the ClientRequestReadInputRegisters function block is changing as I desire when the clientTCP object is connected. I have also...

  • corriibme corriibme posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    It's my very first time with Modbus but I have worked with some other networking protocols before and programmed PLCs using all of Structured Text, FBD, and LAD. I have this ModbusTCP code to read the input registers of a connected device. The problem is that the request messages are not being sent (Wireshark does not record any traffic) even though the xExecute input of the ClientRequestReadInputRegisters function block is changis as I desire when the clientTCP object is connected. I have also adjusted...

1