Posted 11 January I am noticing a problem where i am using MOV instruction and writing literal text into source and String datatype in destination. It works fines in one program but doesn't on another it show an error Invalid Data Type. Argument must match Parameter Data type. I know what the error is and why but my question is why is it working perfectly fine in 1 program and not on another. Share this post Link to post Share on other sites
Posted 11 January Are both machines running same firmware? 1 person likes this Share this post Link to post Share on other sites
Posted 11 January yes the firmware is 34.11 but the one without error is a 5069-l320 PLC and the one with error is 1769-L36erms. Share this post Link to post Share on other sites
Posted 11 January Support for literal strings is relatively new. My guess is the older compact logix cpu doesn't support them. 1 person likes this Share this post Link to post Share on other sites
Posted 11 January Then how come we move or copy strings(texts) in studio 5000 Share this post Link to post Share on other sites
Posted 11 January You can copy strings from one string to another. 'Literals' or 'constants' were only available in last few years. 2 people like this Share this post Link to post Share on other sites
Posted 11 January Well then in that case I will make an AOI and use them wherever required. Share this post Link to post Share on other sites
Posted 11 January Not sure how an AOI will help. Make an array of STRING[] data type and populate them with the ASCII data you require, then just copy the data from the array to the register you want. 1 person likes this Share this post Link to post Share on other sites
Posted 11 January I HAVEN'T USED STUDIO5000 MUCH SO NOT FAMILIAR WITH IT. CAN YOU SEND A SCREENSHOT SHOWING HOW? WHAT I HAVE DONE IS CREATED A STRING AND I CAN MOVE VALUES FROM ONE TO ANOTHER.. BUT IF I CREATE AN ARRAY WHERE DO I WRITE MY TEXTS TO THE WHOLE ARRAY AT ONCE? Share this post Link to post Share on other sites
Posted 11 January (edited) Can we only write Value to string When Online?? Edited 11 January by SSrikakolum Share this post Link to post Share on other sites
Posted 11 January 2 hours ago, SSrikakolum said: Can we only write Value to string When Online?? You can do it offline as well in the Controller Tags > Monitor Tags section, then download to PLC. Chelton is telling you to create a new String array tag then populate it with your static texts. Then in your program COP String[x] to String. 1 person likes this Share this post Link to post Share on other sites