Default Header
(header konnte nicht geladen werden)
(0)| 8/9/2010 8:07 PM | |
|
Joined: 9/27/2006 Last visit: 1/13/2026 Posts: 12480 Rating:
|
Hello PeterPer; If you look at the following FAQ, you will find a group of IECfunctions (already available in Step 7 libraries) that will show you how ou can manipulate strings, and convert different decimal formats to/from strings. http://support.automation.siemens.com/WW/view/en/10913338 Examples 10 and 11 should help you out here: ex. 10 for Strgn_DI, ex. 11 for Strng_I. The sample programs for each example are free dowloadable. There are chargeable functions towards the end of the FAQ, but you should not have to use them here. However, please examine carefully how the strings are built and formatted in Step 7 (the examples are useful for that): the strings you need to convert must match this format, or the IEC functions will not work. This FAQ has an excellent description of how a string is built in Step 7, with the use of the first 2 bytes (maximum length of the string and actual length of the string) reuired for all functions dealing in strings. http://support.automation.siemens.com/WW/view/en/21947834 If you do not have this information in the strings you are dealing with, you could build a small function that would add these bytes to your numeric strings. I would study the example for FC2 CONCAT ("concatenate", adding strings together to form a longer one) in the first link proposed. Hope this helps, Daniel Chartier |
| 8/9/2010 8:45 PM | |
|
Posts: 4 Rating:
|
Many thaks, Ihave it running thaks to you dchartier. |
This contribution was helpful to
|
|
Follow us on