jvalstar Posted February 23, 2018 Report Share Posted February 23, 2018 Hello, In my program I receive a length of vectors on MI120 - MI143. When I use ASCII string to display all the vector in one line on the HMI, I only get the first character which is inside MI120, even when the length is very long. When I put RTC to vector, it is possible to display it with the samen function. So for example: MI120 a MI121 b MI122 c I want to see: abc, but I only get a. How can I solve this? Thanks! Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 23, 2018 MVP 2022 Report Share Posted February 23, 2018 Which PLC are you using? Is there ASCII data in those MIs? Also, be aware that each MI holds two characters. Perhaps the string display is seeing a NULL character and stopping? Quote Link to comment Share on other sites More sharing options...
jvalstar Posted February 23, 2018 Author Report Share Posted February 23, 2018 I'm using the V570. On display there is only the first letter "a" visible, nothing more. Now I've made a test program: #72 (H) in MI0, #56 (8) in MI1. On HMI I use the ASCII String function with start of vector: MI0 and number of characters is 4. And still only H is visible on the screen. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 23, 2018 MVP 2022 Report Share Posted February 23, 2018 1 hour ago, Flex727 said: Also, be aware that each MI holds two characters. Perhaps the string display is seeing a NULL character and stopping? What is it you're trying to do? As I said, each MI holds two characters, not just one. Quote Link to comment Share on other sites More sharing options...
Cam Posted February 23, 2018 Report Share Posted February 23, 2018 As Flex said the ASCII is store with to characters per MI, To test go online and change the data type to HEX and insert 3333 in to MI120 and 3636 in to MI 121 You should see 3366 on the display If you dont check the String pattern and make sure it's long enough to display what your trying to show. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted February 23, 2018 MVP 2022 Report Share Posted February 23, 2018 Can you post your code? Joe T. Quote Link to comment Share on other sites More sharing options...
jvalstar Posted February 26, 2018 Author Report Share Posted February 26, 2018 Thanks for your help. I already fixed it with Transpose MI to byte. Second problem: Sometimes the plc crashes while running scan protocol function to read the byte. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 26, 2018 MVP 2022 Report Share Posted February 26, 2018 What do you mean by "crashes" and how do you know it's being caused by the scan protocol function? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.