Search talk: uint to

 
1 2 3 .. 191 > >> (Page 1 of 191)

2 byte array convert to uint CODESYS Forge talk (Thread)
2 byte array convert to uint
Last updated: 2019-04-30

Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Thread)
Converting UINT into bytes and converting 2Bytes into UINT
Last updated: 2023-12-08

explicit cast ENUM to UINT and vice versa CODESYS Forge talk (Thread)
explicit cast ENUM to UINT and vice versa
Last updated: 2021-03-11

Saving UINT data collected as String data to MMC CODESYS Forge talk (Thread)
Saving UINT data collected as String data to MMC
Last updated: 2007-08-17

Unterschied zwischen WORD und UINT Datentyp CODESYS Forge talk (Thread)
Unterschied zwischen WORD und UINT Datentyp
Last updated: 2005-12-21

R Trigger for UINT CODESYS Forge talk (Thread)
R Trigger for UINT
Last updated: 2022-06-20

Post by abjha1998 on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
Hi, I have been working on Codesys V3.5 with PFC200 controller and Can Gateway 750-658. I want to convert the incoming CAN data from bytes into UINT and for outgoing data bytes to UINT. Does anyone has experience with this kind of data? I tried few different ways but it doesn't seem to be working.
Last updated: 2023-12-07

Was ist der Unterschied zwischen WORD und UINT? CODESYS Forge talk (Thread)
Was ist der Unterschied zwischen WORD und UINT?
Last updated: 2008-04-14

UINT im Binärformat in eine Datei speichern CODESYS Forge talk (Thread)
UINT im Binärformat in eine Datei speichern
Last updated: 2020-01-08

using CTU block for uint counter CODESYS Forge talk (Thread)
using CTU block for uint counter
Last updated: 2016-08-15

Post by hanoues on setting date and time on CPX-E CODESYS Forge talk (Post)
Hello, Can anybody here tell me how to modify the time and date on my CPX-E? I used the code I found on CODESYS online help, but it doesn't work. What am I missing? FUNCTION current_date_time : STRING VAR stUTC_Timestamp : SysTime; //utc time // ULINT#1528280694913 stLocal_TimeStamp : SysTime; //local time but is in general equal // ULINT#1528280694913 stdNow : SysTimeDate; //local time in an object to access each number (day, month...) dtNow : DATE_AND_TIME;//DT#2018-6-6-10:24:54 todNow : TIME_OF_DAY; // TOD#10:24:54.913 datNow : DATE; // D#2018-6-6 END_VAR SysTimeRtcHighResGet(stUTC_Timestamp); // ULINT#1528273494913 SysTimeRtcConvertHighResToLocal(stUTC_Timestamp, stdNow); //convert UTC ULINT to Local SysTime // stdNow.wYear = UINT#2018 // stdNow.wMonth = UINT#6 // stdNowy.wDay = UINT#6 // stdNow.wHour = UINT#10 // stdNow.wMinute = UINT#24 // stdNow.wSecond = UINT#54 // stdNow.wMilliseconds = UINT#913 // stdNow.wDayOfWeek = UINT#3 // stdNow.wYday = UINT#157 SysTimeRtcConvertDateToHighRes(stdNow, stLocal_TimeStamp); // ULINT#1528280694913 dtNow := TO_DT(stLocal_TimeStamp / 1000 ( ms )); // DT#2018-6-6-10:24:54 todNow := TO_TOD(stLocal_TimeStamp MOD TO_ULINT(T#1D)); // TOD#10:24:54.913 datNow := TO_DATE(dtNow); // D#2018-6-6 (convert to appropriate string) current_date_time := concat('$N[', TO_STRING(dtNow)); current_date_time:= concat(current_date_time,'.'); current_date_time:= concat(current_date_time, TO_STRING(stdNow.wMilliseconds)); current_date_time:= concat(current_date_time,'] - '); RETURN;
Last updated: 2024-05-21

Post by kislov on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Packing/PackBytesToWord.html + optional TO_UINT
Last updated: 2023-12-08

Post by dkugler on Reading a negative number CODESYS Forge talk (Post)
why not simply converting data type UINT to INT? Then avoid negative values with ... := MAX(0 , intTest); Good luck!
Last updated: 2025-05-28

Post by apurv on Cannot pass array of constant size to a function as a reference CODESYS Forge talk (Post)
I have a Array of constant size defined like this Var Constant MAX_SIZE :UINT := 10; End_var VAR array : ARRAY[0..MAX_SIZE] OF INT; END_VAR Now I want to pass this array to a function by reference, Function fun : INT VAR_IN_OUT CONSTANT MAX_SIZE : UINT; END_VAR VAR_INPUT array : REFERENCE TO ARRAY[0..MAX_SIZE] OF INT; END_VAR but when I run this it gives strange Errors Error : Cannot Convert type 'ARRAY [0..MAX_SIZE] OF INT' to type 'ARRAY[0..MAX_SIZE] OF INT'
Last updated: 2024-01-07

Post by voffi on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
There are some ways. One is to use SHR and SHL and it depends on your byte order in the data array. For Motorola byte order: PROGRAM PLC_PRG VAR u : UINT; byte_array_in : ARRAY [1..8] OF BYTE := [16#11, 16#12, 16#13, 16#14, 16#15, 16#16, 16#17]; byte_array_out : ARRAY [1..8] OF BYTE; END_VAR u := SHL(TO_UINT(byte_array_in[2]), 8) + TO_UINT(byte_array_in[1]); byte_array_out[1] := TO_BYTE(u); byte_array_out[2] := TO_BYTE(SHR(u, 8)); If it's Intel byte order just change 1 and 2 in the array indexes.
Last updated: 2023-12-07

Post by ph0010421 on Axis EtherCAT address CODESYS Forge talk (Post)
Hello SDO will write to the drive, not the axis, so you need to pass in the ethercat slave: VAR_IN_OUT Axis: IoDrvEthercatLib.ETCSlave; END_VAR Then you can get the address with: Axis.PhysSlaveAddr (as UINT)
Last updated: 2025-03-07

Post by abjha1998 on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
Thank you for the reply. I got an error saying that MEM.PackBytesToWord(GVL.Actual_Speed_DUT_high,GVL.Actual_Speed_DUT_low) = u; is not a valid statement. Am I missing some library?
Last updated: 2023-12-08

Post by abjha1998 on Converting UINT into bytes and converting 2Bytes into UINT CODESYS Forge talk (Post)
Thank you for the reply. I got an error saying that MEM.PackBytesToWord(GVL.Actual_Speed_DUT_high,GVL.Actual_Speed_DUT_low) = u; is not a valid statement. Am I missing some library?
Last updated: 2023-12-08

Post by timvh on FB string and naming CODESYS Forge talk (Post)
Really not clear what you are trying to do, but isn't a Struct enough? So add an object of the type DUT to the Application. Then create a structure TYPE ST_Sensor : STRUCT sName : STRING; uiNumber : UINT; END_STRUCT END_TYPE Then in you application add an instance of this Structure stSensor1 : ST_Sensor := (sName := 'my sensor', uiNumber := 1); or use it like this stSensor1.sName := 'my sensor';
Last updated: 2024-09-28

Post by climblinne on OPC UA Method - How to wait for result? CODESYS Forge talk (Post)
Hello, I am already able to run an OPC UA method in Codesys. Now my question, how can I interact with other tasks (e.g. read an SDO from EtherCAT and return it by the function)? The OPC UA method seems to be called only once (I tried to return BOOL or UINT values). Up to now I only found to do a while loop to wait for the result of the other task. Is there a better way to do it? Is this the way OPC UA functions should be used (for "not too long" function calls) or should I use another mechanism (method: Start, event: Finish, method: getResult)? Regards
Last updated: 2025-01-13

How to use matlab to send parameters to codesys CODESYS Forge talk (Thread)
How to use matlab to send parameters to codesys
Last updated: 2018-10-10

Struggling to connect to EK1100 to Raspberry Pi CODESYS Forge talk (Thread)
Struggling to connect to EK1100 to Raspberry Pi
Last updated: 2025-03-30

Post by paro on Modbus Client Request Not Processed CODESYS Forge talk (Post)
Hi, works in my case if I increase the timeout! to_udint(t#100ms) -> 100 -> 100us.. FUNCTION_BLOCK MODBUS_master_example_ST VAR initDone : BOOL := FALSE; aIPAddress : ARRAY [0..3] OF BYTE := [127,0,0,1]; clientTcp: ModbusFB.ClientTcp; // buffer to read input registers aDataInputRegisters : ARRAY[0..9] OF UINT; // some client requests clientRequestReadInputRegisters: ModbusFB.ClientRequestReadInputRegisters; xExecute: BOOL; uistart: UINT := 100; udiTimeout1: UDINT; END_VAR IF NOT initDone THEN initDone := TRUE; // configure clientTcp clientTcp(aIPaddr:=aIPAddress, uiPort:=502, udiLogOptions := ModbusFB.LoggingOptions.All); // configure clientRequestReadInputRegisters clientRequestReadInputRegisters(rClient:=clientTcp, uiUnitId:=1, udiTimeout:=1000000); // 1sec END_IF // call the client FB's clientTcp(); clientRequestReadInputRegisters(rClient:=clientTcp,xExecute := xExecute AND NOT clientRequestReadInputRegisters.xBusy ,uiStartItem:=uistart, uiQuantity:=3, pData:=ADR(aDataInputRegisters[0]));
Last updated: 2024-05-30

VAR_IN_OUT, POINTER TO and REFERENCE TO CODESYS Forge talk (Thread)
VAR_IN_OUT, POINTER TO and REFERENCE TO
Last updated: 2021-11-16

Unable to connect to this device CODESYS Forge talk (Thread)
Unable to connect to this device
Last updated: 2024-06-28

1 2 3 .. 191 > >> (Page 1 of 191)

Showing results of 4775

Sort by relevance or date