Search talk: string formatting

 
<< < 1 .. 7 8 9 10 11 12 > >> (Page 9 of 12)

Post by i-campbell on FILE_OPERATION_DENIED CODESYS Forge talk (Post)
in your project, to access /var/opt/codesys/PlcLogic/my.file, use the string 'my.file' or '$$PlcLogic$$/my.file'
Last updated: 2023-10-17

Post by goki on Problem mit String in Globaler Variable CODESYS Forge talk (Post)
Hallo Zusammen Gibt es ein Beispiel wie ich dies so im Codesys 3.5 umsetzen kann?
Last updated: 2024-02-09

Post by installwhat on How to access to variable value through symbolic string name CODESYS Forge talk (Post)
https://help.codesys.com/api-content/2/codesys/3.5.12.0/en/_cds_operator_string_to/ Something like this?
Last updated: 2024-06-13

Post by installwhat on How to access to variable value through symbolic string name CODESYS Forge talk (Post)
https://help.codesys.com/api-content/2/codesys/3.5.12.0/en/_cds_operator_string_to/ Something like this?
Last updated: 2024-06-13

Post by vladimirsmall on Send data to USB CODESYS Forge talk (Post)
Hello/ Need send some file ( for example Array of string) to USB. Which library need used for this. Thank you
Last updated: 2024-07-20

Post by eguerra on Error in ScriptingEngine Docs - create_pou() CODESYS Forge talk (Post)
In the ScriptingEngine documentation there seems to be an error (or missing information) in the ScriptIecLanguageObjectContainer part ( https://content.helpme-codesys.com/en/ScriptingEngine/ScriptIecLanguageObjectContainer.html#ScriptIecLanguageObjectContainer.ScriptIecLanguageObjectContainer ). The description of the function create_pou() doesn't specify the correct arguments requested, it only says create_pou(type: SpecialPouType) and a script using the documentation definition of the function will raise an error. I tried passing the function arguments similar to the ones specified for the create_dut() function and it seems to work fine: create_pou(name, PouType) , name : str UPDATE: The offline help has the correct definition IExtendedObject<IScriptObject> create_pou( string name, PouType type = PouType.FunctionBlock, Nullable<Guid> language = null, string return_type = null, string base_type = null, string interfaces = null )
Last updated: 2024-08-05

Post by ph0010421 on How to manage variable types larger than 64 bits - Ethernet/IP CODESYS Forge talk (Post)
My guess is that's a STRING, not an INT type. And it's 128 bytes, not bits
Last updated: 2024-09-23

Post by ph0010421 on TCP/IP client CODESYS Forge talk (Post)
Hello TCIS_Send needs to be longer than 4 bytes because idata is 28 bytes long. There may be other ways, but I would make a UNION with string/array of bytes. Write your STRING into the AsString part then copy the AsBytes part into TCIS_Send (Elements [3] to [30]) then 252 would be in [31] (I've assumed the idata is always the same length)
Last updated: 2023-12-19

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 bertcom on Converting each character to a string into ASCII CODESYS Forge talk (Post)
@TimvH, Thank you, i think this way i can seperate the complete string to characters. Next part of the topic is converting the characters to an ASCII code. Is there an standerd function in Codesys for this? I alredy searched a few hours for it on the internet. no succes.
Last updated: 4 days ago

Post by ph0010421 on How to create a stopwatch? CODESYS Forge talk (Post)
Do you need an 'hours-run' counter? And 1 second resolution is ok? I think you're over-thinking it. (The task time needs to be < 1second) Have a look at the LAD... Then, the time in seconds can be made into hh:mm:ss with this FUNction Declarations: FUNCTION funSecondsToStringTime: string VAR_INPUT InSeconds: UDINT; END_VAR VAR AsString: STRING; Minutes: UDINT; Hours: UDINT; Seconds: UDINT; MinutesAsString: STRING(2); HoursAsString: STRING(2); SecondsAsString: STRING(2); END_VAR and the code: Hours := InSeconds / 60 / 60; //Derive hours Minutes := (InSeconds - (Hours * 60 * 60)) / 60; //Derive minutes Seconds := InSeconds - ((Hours * 60 * 60) + (Minutes * 60));//Derive seconds HoursAsString := UDINT_TO_STRING(Hours); MinutesAsString := UDINT_TO_STRING(Minutes); SecondsAsString := UDINT_TO_STRING(Seconds); IF LEN(HoursAsString) = 1 THEN HoursAsString := CONCAT('0',HoursAsString); END_IF; IF LEN(MinutesAsString) = 1 THEN MinutesAsString := CONCAT('0',MinutesAsString); END_IF; IF LEN(SecondsAsString) = 1 THEN SecondsAsString := CONCAT('0',SecondsAsString); END_IF; AsString := CONCAT(HoursAsString, ':'); //assemble string AsString := CONCAT(AsString,MinutesAsString); AsString := CONCAT(AsString,':'); AsString := CONCAT(AsString, SecondsAsString); funSecondsToStringTime := AsString;
Last updated: 2023-12-08

Post by captaincookie on increase default string length in queue CODESYS Forge talk (Post)
Hello, I'm using Codesys V3.5 SP18 Patch 4. In the ElementCollectionExample Project from Codesys, I test the SimpleQueueExample in a Control Win V3 x64 environment. I try to add a string of 95 characters length to a queue. The default length of strings is defined as 80 characters. In the initialization of a string variable, it is possible to increase the length by the definition of e.g. STRING(1000). But when I write the string defined like this to the queue, only 80 characters are written to it and the rest is missing. I think the default length is still set in the queue definition, so it is necessary to change this, isn't it? Is there any option to increase the default length of strings in the queue? Attached you can find the used project. Thanks in advance. If any information are missing or my description unclear please let me know.
Last updated: 2023-10-05

Post by andrebrandt on FB string and naming CODESYS Forge talk (Post)
Hi Tim. Not quite correct. What i'd like, is when you place the FB in prog, i choose a block NTC10k, and name this RT401. What i'm trying to do, is to get the name RT401 automaticly into the FB, so i can put this into the string i pass in a struct. So in var in POU, i saw this a place i could do this, RT401: NTC10k(Tag:='RT401'), but i can't get this to work. I shurly must have had something like this in FB: FUNCTION_BLOCK NTC10k String TAG But it's here where I'm stuck...
Last updated: 2024-09-30

Post by struccc on HTML5 Controls - string(>80) values CODESYS Forge talk (Post)
Dear all, does anyone have experience with HTML5 controls recently? CODESYS 3.5.20.30 / Visualization 4.6.0.0 I'd like to create a simple lightweight text editor, with proper multiline handling, cut & paste, scrolling, etc. And it seems to work fine, just have problems with strings longer than 80 bytes.... Declaring a variable sText1 : STRING(8000) and referencing it in the HTML5 Controls corresponding value property works perfectly one way: the code receive the data as a string (See log1)... (Note TypeID 1000...) Also sending back the data (seems to work (See log2) except it doesn't change the value of the bound variable. Probably the issue is with using SendSimpleValue method... Naturally, I could do a workaround, but maybe there is a more standard way to implement this... Please let me know if you have any suggestions.
Last updated: 2024-10-23

Post by shawn-plc on Return value from a tag given a string literal CODESYS Forge talk (Post)
Good afternoon everyone, I am looking for a way to return a value given a string tag path. I put together a pseudo-example to illustrate my use-case and was wondering if anyone in this forum can help. The function fnValueFromTagPath is the function I am looking to either create or use from existing library. I would greatly appreciate it. Please see the attachment for additional detail. -Shawn
Last updated: 2024-08-13

Post by andrebrandt on FB string and naming CODESYS Forge talk (Post)
Hi all. I have a FB written in ST. FUNCTION_BLOCK NTC10k VAR_INPUT Syst:STRING; In:REAL; END_VAR VAR_OUTPUT Out:REAL; OTag:STRING; Out_St:Struct_NTC10K; END_VAR VAR Tag:STRING; InstanceName: STRING; Structure:Struct_NTC10K; END_VAR What i'm trying to do, is to pass data to structure. In structure i want to add a tag with systemnumber and sensorname. '320.001-RT401' In pou i use this RT401: NTC10k;, and tried this RT401: NTC10k(Tag:='RT401'); Anyone done this?
Last updated: 2024-09-26

Post by vstrom on Recipe definition, how to have the Name string in current language? CODESYS Forge talk (Post)
I'd like to know if it is possible to have the "Name" field, in the recipe definition, language dependent. Something like to have the possibility to put there a string ID that will be add to the GlobalTextList. In this way it can be translated and when showed in a Visualization screen its value depend on the current language. Thanks.
Last updated: 2024-10-04

Post by sedoerr on Check For Open Dialogs On Client CODESYS Forge talk (Post)
FUNCTION CheckDialogOpen : BOOL VAR_INPUT sDialogName : STRING; END_VAR VAR pstClientData : POINTER TO VisuElems.VisuStructClientData; itfDialogManager : VisuElems.IDialogManager; itfMyDialog : VisuElems.IVisualisationDialog; END_VAR VisuElems.g_ClientManager.BeginIteration(); WHILE (pstClientData := VisuElems.VisuElemBase.g_ClientManager.GetNextClient()) <> 0 DO itfDialogManager := VisuElems.g_VisuManager.GetDialogManager(); itfMyDialog := itfDialogManager.GetDialog(sDialogName); CheckDialogOpen := VisuDialogs.VisuDlgUtil_IsDialogOpen(itfMyDialog,pstClientData,itfDialogManager); IF CheckDialogOpen THEN EXIT; END_IF END_WHILE
Last updated: 2023-09-26

Post by captaincookie on increase default string length in queue CODESYS Forge talk (Post)
I solved it by creating a new element of IElement according to the ElementExample (MyElement) in the ElementCollectionsExamples project. The variables in this element can then be defined in any properties as needed.
Last updated: 2023-10-11

Post by paro on OPCUA array max length? CODESYS Forge talk (Post)
I think the amount of data is already relatively high and maybe it has something to do with that? Maybe also the CPU load of your device? an array with string(5000)? and have you tested with how many array elements it still works?
Last updated: 2024-02-17

Post by dhumphries on Not able to see input data coming from eip adapter on codesys CODESYS Forge talk (Post)
The green icon with an ! next to the device is concerning. Is the data type correct for the input, you are using a byte input but the description says string. Is there anything useful in the status tab?
Last updated: 2024-03-06

Post by dkugler on I want to convert a WORD to a hex string like 15.432 to '3C48' CODESYS Forge talk (Post)
you try to convert a WORD with BYTE_TO_HEX directly? Using https://de.helpme-codesys.com/ lead to the SM3_shared lib. There is a function: https://content.helpme-codesys.com/en/libs/SM3_Shared/Current/SM3_Shared/StringFormat/Word_To_HexString.html
Last updated: 2024-04-19

Post by damian177 on Raspbery Pi and Calendar CODESYS Forge talk (Post)
Hi, In my visualisation I have a "Calendar" control. I would like save day and month which will be clicket by operator on this control . forexample save in string array. How do this ?
Last updated: 2024-04-23

Post by damian177 on Visualization - table element CODESYS Forge talk (Post)
Hi, In my application I use table elemnt with filled by STRING ARRAY. I would like to implement the following functionality : When I click on second row, that this row will be cleared. Anyone can help me?
Last updated: 2024-04-25

Post by installwhat on How to access to variable value through symbolic string name CODESYS Forge talk (Post)
Maybe your question makes sense but I don't see it. Maybe you should rephrase and add a lot of detail
Last updated: 2024-06-13

<< < 1 .. 7 8 9 10 11 12 > >> (Page 9 of 12)

Showing results of 284

Sort by relevance or date