12 posts in this topic

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.

Screenshot 2.png

Screenshot 1.png

Share this post


Link to post
Share on other sites

Are both machines running same firmware?

1 person likes this

Share this post


Link to post
Share on other sites

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

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

Then how come we move or copy strings(texts) in studio 5000

Share this post


Link to post
Share on other sites

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

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

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

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

Can we only write Value to string When Online??

Edited by SSrikakolum

Share this post


Link to post
Share on other sites
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now