10/12/2020 2:29 PM | |
Joined: 9/23/2005 Last visit: 9/6/2024 Posts: 4686 Rating:
|
2*10000+4*1000+3*100+9*10+1 or (((2*10+4)*10+3)*10+9)*10+1 And as a bonus - the ASCII table. |
Regards, |
|
10/12/2020 2:58 PM | |
Joined: 9/27/2006 Last visit: 9/4/2024 Posts: 12282 Rating:
|
Hello Aleksandr; In the Step 7 v5.x instruction libraries, you can see the IEC standard functions. These include 2 blocks that should interest you, FC 37 (Str to DI) and FC 38 (Str to I). You can find descriptions of these blocks in this article: https://support.industry.siemens.com/cs/ww/en/view/10913338 If you plan to use these functions you must first turn your char variables into string, as defined in Siemens Step 7. A string' first 2 bytes contain specific information for the compiler, the maximun length of the string and the actual length used. Then the first, second, ... character. So Str[4] actually occupies 6 bytes, of which 4 are the actual string char values. Look at this discussion for hints on converting an array of chars to a string in Step 7. https://support.industry.siemens.com/tf//ww/en/posts/converting-the-types/213753/?page=0&pageSize=10 Hope this helps, |
10/12/2020 3:44 PM | |
Joined: 1/22/2018 Last visit: 4/15/2024 Posts: 5 Rating:
|
This is what I need. Thanks |
2/24/2023 12:25 PM | |
Joined: 7/10/2014 Last visit: 7/18/2024 Posts: 7 Rating:
|
This might help although it is in tia portal |
This contribution was helpful to
1 thankful Users |
Follow us on