3/7/2016 1:28 PM | |
Joined: 6/3/2014 Last visit: 9/26/2024 Posts: 660 Rating: (194) |
Hello, what datatype are your SmartTags? I understand you want to write them into the CSV file, but NOT decimal coded. You use ChrW() to change from decimal to the coded character. I looked it up and found the following. Maybe this interrupts your lines, if the values are too low? https://msdn.microsoft.com/en-us/en-en/library/613dxh46(v=vs.90).aspx
Do you get the same problem if you use Chr() instead? How big is the valid range you need? |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ★ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
|
3/7/2016 2:20 PM | |
Joined: 4/28/2015 Last visit: 11/1/2021 Posts: 112 Rating: (0) |
Hi H.J. yes you understood me correctly - it should NOT be decimal coded.
I have tried Chr, Chrw, Asc, AscB, AscW.... it seems to be the same problem for all those options.... Since the system is not build yet I am simulation this data. I am simply using a counter to count between 65 and 90 (from A to Z). So the smallest value is 65 dec.
Well, any other suggestions?
Thanks.... |
Last edited by: AutoGen_756614 at: 3/7/2016 2:20:36 PM |
|
3/7/2016 2:34 PM | |
Joined: 6/3/2014 Last visit: 9/26/2024 Posts: 660 Rating: (194) |
Hi, my idea would be to convert integer>char in the PLC before sending the data to the HMI - it's better equipped for processing data. A useful command in SCL could be INT_TO_CHAR, and here is an interesting forum post about the conversion in AWL: https://support.industry.siemens.com/tf/ww/en/posts/62618/. Hope it helps. |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ★ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
|
3/7/2016 2:37 PM | |
Joined: 4/28/2015 Last visit: 11/1/2021 Posts: 112 Rating: (0) |
Hi, well it is already done.... on the PLC site I have got a DB with Array(1..40) of Char. Thanks |
3/8/2016 8:41 AM | |
Joined: 4/28/2015 Last visit: 11/1/2021 Posts: 112 Rating: (0) |
Hi, I hope you undrestood my previous post.... I have had it in my DB as char already... Have you got for my any other suggestions? Greetings. Tym |
3/8/2016 11:15 AM | |
Joined: 6/3/2014 Last visit: 9/26/2024 Posts: 660 Rating: (194) |
Hi Tym, yeah, sorry. Missed that part in your original post. At the moment I don't have an idea, but if I think of something I'll let you know. |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ★ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
|
Follow us on