Search talk: real to array

 
<< < 1 .. 18 19 20 21 22 .. 204 > >> (Page 20 of 204)

Post by critcho on WebVisu Numpad dialog - Dialogtitle not accepting string variable CODESYS Forge talk (Post)
I have a WebVisu page which is re-used for multiple types of gas; it displays the alarm thresholds etc. for one gas at a time. I have an array of structures holding the set-points for each of the gasses. I'm trying to change the dialog title for the value input pop-up (VisuDialogs.Numpad). The Dialogtitle is set to Gas_Alarms.HighAlarmActivationLevelDialog, which is a string(50): When the gas type is changed (page first loaded, or prev/next buttons), METHOD Gas_Alarms.Update_Display_Variables is called, to update the strings used for the dialog titles so it shows GasName High Alarm Activation Level (EngineeringUnits), e.g. CO2 High Alarm Activation Level (PPM): HighAlarmActivationLevelDialog := Insert(' High Alarm Activation Level ()', EngineeringUnits, 30); HighAlarmActivationLevelDialog := Insert(HighAlarmActivationLevelDialog, GasName, 0); (That's not where the problem is, I'm just explaining why I'm using a variable dialogue title.) The variables used are definitely strings, but i'm always getting the error: "The type of the dialog title must be either STRING or WSTRING". I've tried moving HighAlarmActivationLevelDialog etc. to the GVL and also changing them to WSTRING, I even tried adding them to the structure array, but I always get the same error. Clearing the dialog title for that element removes the error - so I'm confident it's not a phantom error caused by something else. But I should be able to add these titles, can't just nuke them all to make it work. The MinVal and MaxVal for the Numpad are called from the array, e.g. GVL.Gas_Alarm_Configs[0].ScaledValueMIN, they are not getting an error. I am using array indexes 1 - 5 for the gasses, when I load the form or change gas, I copy the selected index to index 0 of the array, and values from Gas_Alarm_Configs[0].[ALL] are displayed on the page. When they hit save, I copy Gas_Alarm_Configs[0].[ALL] to Gas_Alarm_Configs[CurrentGasIndex].[ALL]. (ALL just means every element, I can't figure out how to display an asterix in this question... :) ) I've searched online for variable title dialog, but not found anything to help. Thanks for your help!
Last updated: 2025-05-29

Post by damian177 on Persistence variables PFC200 CODESYS Forge talk (Post)
Hi, I using persistence variables like below: VAR_GLOBAL PERSISTENT RETAIN id_worker1: ARRAY [0..3] OF INT := [231,234,176,222]; id_worker2: ARRAY [0..3] OF INT := [211,129,125,221]; Initial values can cause some problems?
Last updated: 2023-12-08

Post by xabier on Remove white spaces in file .txt CODESYS Forge talk (Post)
Hi, I want write a array with line break in file.txt (I attacehd the screen array) and when i check the file appear with white spaces (I attached file .txt ) Somepeople know how remove this white spaces?? Thanks you Regars XABI
Last updated: 2024-04-22

The element of type 'VisuFbElemImage' could not be updated. Reason: Index was outside the bounds of the array. CODESYS Forge talk (Thread)
The element of type 'VisuFbElemImage' could not be updated. Reason: Index was outside the bounds of the array.
Last updated: 2024-12-03

Post by svn123 on In Simulation Mode, logic is not executing CODESYS Forge talk (Post)
Please check the attached snapshot. I am converting an int to real and storing in rVlv01_SV and then scaling the value using LIN_TRAFO. In the bottom Status Bar of Codesys, both RUN and SIMULATION are visible. When I enter value 100 as input to INT_TO_REAL instruction and press Ctrl-F7, the value can be seen at the input but the logic seems not to work. I searched for help but could not find anything relevant. What could be the reason. Codesys ver3.5.11 svn
Last updated: 2023-12-25

Post by ndzied2 on Rounding error in simple addition CODESYS Forge talk (Post)
This is a consequence of how computers store floating point numbers. 0.1 cannot be exactly represented in a computer. This is not a CoDeSys thing. Here is a link to a converter to show you the exact value that is represented when you use a REAL data type (which is a 32 bit float). https://baseconvert.com/ieee-754-floating-point If you really need to keep track of 0.1 increments. use INT OR DINT and then add 1 each time and assume that there is one decimal place.
Last updated: 2024-05-24

Post by nz-dave on Ethernet/IP Scanner Exception CODESYS Forge talk (Post)
3.5,18,30 The Weintek HMI Runs a dual core CPU.. one for the HMI and one "real time OS" for Running Codesys.
Last updated: 2024-12-28

Post by eschwellinger on Enable and Disable Project IO programmatically CODESYS Forge talk (Post)
In simulation mode there are no fieldbus updates possible - so this makes only sense with real devices.
Last updated: 2025-03-04

Post by alexgooi on Modbus writing on value change CODESYS Forge talk (Post)
The way I usally tackle this is by syncing only words (then you are able to use the FB above). If you then want to write a Boolean simply type it like this. Value[1].0 := Bool1; Value[1].1 := Bool2; Value[1].2 := Bool3; Uints have the same number of bits than a INT/WORD so these ones will work as well (they are only represented diffrently). A Real will work but you will loose some infomration in the conversion. If you want to keep the information you can convert 2 words to a float with a function (for example with the IEEE-754 standard) . In this way the syncing to the server is very simple and in the Codesys Program you decide what part of the word you want to use.
Last updated: 2024-04-03

I want to convert a WORD to a hex string like 15.432 to '3C48' CODESYS Forge talk (Thread)
I want to convert a WORD to a hex string like 15.432 to '3C48'
Last updated: 2024-04-19

How to allow a user to handle certificates without access to sourcecode? CODESYS Forge talk (Thread)
How to allow a user to handle certificates without access to sourcecode?
Last updated: 2024-08-07

Post by bjarne-pagaard on Codesys v3.5 Sint to byte CODESYS Forge talk (Post)
Hi A SINT is a short (signed) integer. It is already only 1 byte - so you should have no problem casting it to a byte like so: bMyByte := TO_BYTE(sintMyShortInt); If you have a regular INT you want to put in 2 bytes - there are a lot of ways you can do this. A Union is certainly one of them. You could have a union with 2 memebers: An array of 2 bytes as one member, and an integer value as another member. Another way would be to look at MEMCPY to put the value into your CAN-message. .. or create a function to take your input value as input, and giving you 2 individual bytes as output. This could be handy if you need to change the byte-order. Integer data types: https://help.codesys.com/webapp/_cds_datatype_integer;product=codesys;version=3.5.17.0 -Bjarne
Last updated: 2024-04-24

Post by manuknecht on High Cycle Times for SoftMotion_PlanningTask when using AxisGroup CODESYS Forge talk (Post)
Hi, we did install the real-time kernel patch on the RPI and also performed the additional optimizations including isolating the cores. Changing the configuration of the planning task e.g. running it on a separate core, changing the cycle times and mode from cyclic to freewheeling did not show any improvements.
Last updated: 2024-03-14

Post by davidmic on Struct Literal CODESYS Forge talk (Post)
Hi all I want to pass a struct into a function without declaring the struct in a VAR/END_VAR. Is this possible? I think this would be called a struct literal It would look something like this someFB.write(structArgument := MyStruct#(a := 1, b := 1.2), otherArgument := TRUE); With this struct declaration TYPE MyStruct : STRUCT a : INT; b : REAL; END_STRUCT END_TYPE
Last updated: 2025-03-28

how to add module to raspberry pi CODESYS Forge talk (Thread)
how to add module to raspberry pi
Last updated: 2020-11-24

how to set custom from/to timestamp in Trend CODESYS Forge talk (Thread)
how to set custom from/to timestamp in Trend
Last updated: 2020-03-31

Unable to connect to git remotes through Codesys. CODESYS Forge talk (Thread)
Unable to connect to git remotes through Codesys.
Last updated: 2023-11-10

Codesys to Android App to Cloud Database CODESYS Forge talk (Thread)
Codesys to Android App to Cloud Database
Last updated: 2022-03-10

How to map to values in CAN BUS CODESYS Forge talk (Thread)
How to map to values in CAN BUS
Last updated: 2021-04-29

Using Codesys WebClinet to talk to Sensibo API CODESYS Forge talk (Thread)
Using Codesys WebClinet to talk to Sensibo API
Last updated: 2021-07-20

How to add a VFD to Codesys CODESYS Forge talk (Thread)
How to add a VFD to Codesys
Last updated: 2023-05-12

How to convert Function block diagram to Structured text CODESYS Forge talk (Thread)
How to convert Function block diagram to Structured text
Last updated: 2015-05-04

How to save sensor values ​​to a file CODESYS Forge talk (Thread)
How to save sensor values ​​to a file
Last updated: 2023-02-22

HMI will not connect to PLC to display visu. CODESYS Forge talk (Thread)
HMI will not connect to PLC to display visu.
Last updated: 2020-02-28

how to Connect CodeSys to many devices? CODESYS Forge talk (Thread)
how to Connect CodeSys to many devices?
Last updated: 2017-08-16

<< < 1 .. 18 19 20 21 22 .. 204 > >> (Page 20 of 204)

Showing results of 5077

Sort by relevance or date