Search talk: string to word

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

Post by rmaas on STRING conversions to DWORD CODESYS Forge talk (Post)
Hi, The '' characters in Codesys are there only to indicate it is a STRING type. They are not actually added to the string, maybe you are adding them unintentionally in the concat function? You can send your data from Codesys to Hercules to verify... Another option is to send the data as an array of bytes instead of a string, with every byte representing 1 ASCII character. https://www.ascii-code.com/ This way you are 100% sure Codesys is not adding any unwanted characters.
Last updated: 2025-01-31

Post by marekxc on Little endian to Float from Modbus RTU CODESYS Forge talk (Post)
Maybe try going back to step one and: Var Reg1: WORD; Reg2: WORD; Reg12: DWORD; Value: REAL; end_var // program Reg1:= 4096; Reg2:= 14884; Reg12:= (reg2 * 65536) + reg1; Value:= DWORD_TO_REAL(Reg12);
Last updated: 2023-12-28

Post by bertcom on Converting each character to a string into ASCII CODESYS Forge talk (Post)
Good afternoon, I have a project where i need to split a string and send it in ascii code to an Domino Printer. Concept: i get an String from an Zebra scanner looking like this : " R002043;5410761402862;Oil Plus 2C Comp.A - Gris Belge;1286193824;" To start is the ";" the seperator. i found some functions to delete the ";" in a string. this is okay but now i want to convert each digit in the string into ascii like this: R=82 0=48 0=48 2=50 0=48 ... This because the printer wants to receive a string like this: <esc>OQ001TE 82 48 48 50 48 ...<eot></eot></esc> Anyone who can help me with setting me on the right track with some advice?
Last updated: 2024-11-08

Post by bertcom on Converting each character to a string into ASCII CODESYS Forge talk (Post)
Good afternoon, I have a project where i need to split a string and send it in ascii code to an Domino Printer. Concept: i get an String from an Zebra scanner looking like this : " R002043;5410761402862;Oil Plus 2C Comp.A - Gris Belge;1286193824;" To start is the ";" the seperator. i found some functions to delete the ";" in a string. this is okay but now i want to convert each digit in the string into ascii like this: R=82 0=48 0=48 2=50 0=48 ... This because the printer wants to receive a string like this: <esc>OQ001TE 82 48 48 50 48 ...<eot></eot></esc> Anyone who can help me with setting me on the right track with some advice?
Last updated: 2024-11-08

Post by wiresplus on INT_TO_WORD function not working CODESYS Forge talk (Post)
Hello, I need to take an INT input, and convert it to a WORD value. VAR DRV2Speed : WORD; //IO card takes a WORD where 16000 = full 10V output (equivalent to 50Hz) PumpFillSpeed : INT; //Users enter a value between 0 and 50 END_VAR IF <conditions> THEN DRV2Speed :=INT_TO_WORD((PumpFillSpeed/50)*16000); END_IF </conditions> According to me this should work - but it stays at 0, no matter what. What am I doing wrong?
Last updated: 2024-01-26

Post by bertcom on STRING conversions to DWORD CODESYS Forge talk (Post)
Hi rmaas, Do you have any explenation how to send it to Hercules? Thank you!
Last updated: 2025-02-01

Post by mmpl on Array to String CODESYS Forge talk (Post)
I would like to create one large JSON string from an array of objects, where each object contains a value. My current approach involves using a for loop and string concatenation, but with 20,000 elements in the array, this method takes almost 7 seconds and negatively affects the PLC scan time. Is there a more efficient way to accomplish this?
Last updated: 2024-07-18

Post by mmpl on Array to String CODESYS Forge talk (Post)
I would like to create one large JSON string from an array of objects, where each object contains a value. My current approach involves using a for loop and string concatenation, but with 20,000 elements in the array, this method takes almost 7 seconds and negatively affects the PLC scan time. Is there a more efficient way to accomplish this?
Last updated: 2024-07-18

Post by timvh on Converting each character to a string into ASCII CODESYS Forge talk (Post)
A standard string is actually a list of bytes that represent the ASCII code for each character. The following part of code will give you the ASCII code of one of the characters in the string: byChar := sInput[i];
Last updated: 2024-11-11

Post by tvm on Timer On Vijeo CODESYS Forge talk (Post)
Vijeo doesn't support TIME variables, so the easiest thing to do is convert to a STRING in your program, and use that variable. You could use TimeAsString:= TIME_TO_STRING(TimeVar) to get a string that looks like this: T#5h10m45s200ms
Last updated: 2024-05-07

Post by ph0010421 on How to manage variable types larger than 64 bits - Ethernet/IP CODESYS Forge talk (Post)
So it's currently mapped to an array of BYTES? Can you create a UNION? TYPE sBytesString : UNION AsBytes: ARRAY[0..127] OF BYTE; AsString: STRING(128); END_UNION END_TYPE Map it to the bytes, read it in the STRING!
Last updated: 2024-09-23

String type object length in CANopen OD? CODESYS Forge talk (Thread)
String type object length in CANopen OD?
Last updated: 2010-01-09

Specific Data from the device string CODESYS Forge talk (Thread)
Specific Data from the device string
Last updated: 2010-12-06

Why SA0175: Suspicious operation on string: Possible index access CODESYS Forge talk (Thread)
Why SA0175: Suspicious operation on string: Possible index access
Last updated: 2023-06-01

String zusammensetzen der länger als 255 Zeichen ist? CODESYS Forge talk (Thread)
String zusammensetzen der länger als 255 Zeichen ist?
Last updated: 2009-02-19

Converting Variable Symbol name in a STRING CODESYS Forge talk (Thread)
Converting Variable Symbol name in a STRING
Last updated: 2008-12-09

Mathematische Formel aus einem String heraus berechnen CODESYS Forge talk (Thread)
Mathematische Formel aus einem String heraus berechnen
Last updated: 2006-10-07

STRING functions for more than 255 charater CODESYS Forge talk (Thread)
STRING functions for more than 255 charater
Last updated: 2015-01-22

Get a instance name as string variable? CODESYS Forge talk (Thread)
Get a instance name as string variable?
Last updated: 2010-02-27

Create a string by extracting value from a file CODESYS Forge talk (Thread)
Create a string by extracting value from a file
Last updated: 2022-06-26

Get symbol address and length from string of symbol name CODESYS Forge talk (Thread)
Get symbol address and length from string of symbol name
Last updated: 2022-06-21

Convert combo box selected items into a string CODESYS Forge talk (Thread)
Convert combo box selected items into a string
Last updated: 2020-04-20

String Constants CoDeSys => Tera Term Pro CODESYS Forge talk (Thread)
String Constants CoDeSys => Tera Term Pro
Last updated: 2006-11-07

STRING-Arrays as data-points in a graph CODESYS Forge talk (Thread)
STRING-Arrays as data-points in a graph
Last updated: 2021-03-16

SVN - Revision-String von Bibliothek und Projekt CODESYS Forge talk (Thread)
SVN - Revision-String von Bibliothek und Projekt
Last updated: 2018-05-15

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

Showing results of 4942

Sort by relevance or date