Search talk: array to int

 
<< < 1 .. 42 43 44 45 46 .. 233 > >> (Page 44 of 233)

Upgrade from codesys 3.5.19 to 3.5.20 CODESYS Forge talk (Thread)
Upgrade from codesys 3.5.19 to 3.5.20
Last updated: 2024-04-20

Remote connection to ifm PLC & HMI CODESYS Forge talk (Thread)
Remote connection to ifm PLC & HMI
Last updated: 2024-04-23

Upgrade from codesys 3.5.19 to 3.5.20 CODESYS Forge talk (Thread)
Upgrade from codesys 3.5.19 to 3.5.20
Last updated: 2024-04-23

Codesys v3.5 Sint to byte CODESYS Forge talk (Thread)
Codesys v3.5 Sint to byte
Last updated: 2024-04-24

CANOpen SDO to write VISIBLE STRING CODESYS Forge talk (Thread)
CANOpen SDO to write VISIBLE STRING
Last updated: 2024-04-29

How to reset AzureMQTTClient after error? CODESYS Forge talk (Thread)
How to reset AzureMQTTClient after error?
Last updated: 2024-06-04

Is it possible to profile builds? CODESYS Forge talk (Thread)
Is it possible to profile builds?
Last updated: 2024-06-05

Is it possible to profile builds? CODESYS Forge talk (Thread)
Is it possible to profile builds?
Last updated: 2024-06-06

how to use UseDataExpanding() in datasource CODESYS Forge talk (Thread)
how to use UseDataExpanding() in datasource
Last updated: 2024-06-17

OPC UA Client failed to connect CODESYS Forge talk (Thread)
OPC UA Client failed to connect
Last updated: 2025-10-28

Can't get SMC_SmoothPath to work CODESYS Forge talk (Thread)
Can't get SMC_SmoothPath to work
Last updated: 2026-01-11

Access to the path *** is denied CODESYS Forge talk (Thread)
Access to the path *** is denied
Last updated: 2025-12-11

Library documentation up to date CODESYS Forge talk (Thread)
Library documentation up to date
Last updated: 2025-12-22

Deploying to raspberry pi 5 hangs CODESYS Forge talk (Thread)
Deploying to raspberry pi 5 hangs
Last updated: 2025-12-25

Best practice to reduce CPU load CODESYS Forge talk (Thread)
Best practice to reduce CPU load
Last updated: 2026-04-21

Connect to Azure IoT Hub CODESYS Forge talk (Thread)
Connect to Azure IoT Hub
Last updated: 2026-04-24

Unable to install previously installed version CODESYS Forge talk (Thread)
Unable to install previously installed version
Last updated: 2026-02-20

Connect to Azure IoT Hub CODESYS Forge talk (Thread)
Connect to Azure IoT Hub
Last updated: 2026-04-27

Post by jackbrady on Function Blocks and arrays of function blocks CODESYS Forge talk (Post)
Hello, I am new to Codesys and PLC programming in general (please go easy ha!) I'm not looking for code to be written for me just some help and pointing in the right direction. I am writing some code to send commands to a relay based on input values (to put it simply). Quite basic stuff. I have wrote a function block that takes a global variable (Open_command:BOOL) and outputs to another global variable (Opened : BOOL). The function block is simulating a device so I'll eventually get the globals from that. I now need to create multiple versions of this function block/ device (lets say 100) but I need each iteration of that function block to reference it's own relevant global variable. I think that the best way of doing this would be to use arrays, although I could be wrong. I am aware that for up to 100 instances I could very well manually assign everything but that seems rather time consuming and I want a fancier way of doing it. Here is a very basic example of what I am looking to do, please note I have not written this in proper code it's just to show what I mean. Global Variables V[0-100] int Open_command [0-100] Bool Opened [0-100] Bool Function Block var input x : BOOL Var output y : BOOL if x then y = TRUE ELSE y = FALSE The input to my function block will be Open_command, output will be Opened Example code. If V[x] > 10 then Open_command [x] = TRUE ELSE Open_command [x] = FALSE (So when V1 goes above 10 I need Open_command1 = TRUE therefore initiating FB1 output. V2 > 10, open_command2 = True > FB2 output V3 > 10, open_command3 = True > FB3 output ... ... ) What I can't seem to figure out is how to tie all this together, I have read through the codesys documentation and if anything it has confused me more! ha. Apologies for the poorly written post but hopefully you understand what I am trying to get at. Thanks, Jack
Last updated: 2024-02-14

Post by alimans on Hex string CODESYS Forge talk (Post)
Hi kdkwhite, for Word you still can use suggested code by using a union structure and crack down your Word to two byte as bellow: TYPE CrackWordToByte : UNION InWord : WORD; OutBytes : ARRAY [0..1] OF BYTE; END_UNION END_TYPE then define your variable as this type: udInput : CrackWordToByte; now assign your Word variable input to InWord and send OutBytes[x] to the mentioned method: udInput.InWord := WordVariableInput; Input := udInput.OutBytes[x]; Regarding your question about the code: actually 48 is ascii code of "0" and while 65 is the ascii code of "A" so in above code 55 + 10 would be 65.
Last updated: 2023-09-20

Post by sumit on Not able to see input data coming from eip adapter on codesys CODESYS Forge talk (Post)
dhumphries, I changed the datatype this time from BYTE to USINT (because that's what my adapter is sending: array of uint8_t). The text "New Help String" you saw in previous screenshots is just the description of the input/s (it can be anything). I also looked into the logs (see attached) for that ! sign next to the device, I found that connection is being timeout. I tried some suggestions from online such as increase the RPI but still got connection timeout issue, also by changing the datatype, I still don't see incoming data from the adapter, although its visible on wireshark. thanks,
Last updated: 2024-03-07

Post by rohitk on CoDeSys libraries for BECKHOFF EL7332/EL7342 CODESYS Forge talk (Post)
Hi, step 1 : go to beckhoff website, go to required IO card, go to download option in that, go to XML donlowad and download the file Step2 : Go to codesys software, go to tools - deviceRepository - install that downloaded file.
Last updated: 2023-08-24

Post by riccardo on How to allow a user to handle certificates without access to sourcecode? CODESYS Forge talk (Post)
It would be usefull to me too, I would need to manage HTTPS and OPC UA certificate without perform the access to the whole sorce code project
Last updated: 2023-11-27

How to transfer data from DINT to Union(16 Bools) which I need to use in Few FBs CODESYS Forge talk (Thread)
How to transfer data from DINT to Union(16 Bools) which I need to use in Few FBs
Last updated: 2023-12-14

Post by alexgooi on Modbus writing on value change CODESYS Forge talk (Post)
Hi Duvan, You could make this in 1 single object (FB), Indeed don't use a function for this beacuse you need some memory to keep the old value. For i := 0 TO 200 BY 1 DO //Check if the value has been changed IF Old_Value[i] <> Value[i] THEN //Set the trigger to TRUE Trigger[i] := TRUE; Old_Value[i] := Value[i]; END_IF END_FOR If you define the Value array as an In_Out and the Trigger as an In_Out you arn't claiming any aditional memory to your system. You ofcourse then need to add some code arround it that does something with the trigger and writes it back to FALSE again. If you want more flexability you also could use pointers instead of using the IN_OUT FOR i := 0 TO 200 BY 1 DO address := address_Input + i * SIZEOF(*Put type here); IF Address^ <> Old_Value[i] THEN Trigger[i] := TRUE; Old_Value[i] := Address^; END_IF END_FOR
Last updated: 2024-04-02

<< < 1 .. 42 43 44 45 46 .. 233 > >> (Page 44 of 233)

Showing results of 5804

Sort by relevance or date