Sign in to follow this  
Followers 0
hapetter

Programming question

10 posts in this topic

Me again:) Ok now I have a small programming question: What I like to do is to move (or copy) a text to a variable, depending on the input (3-way switch). So I have 3 string variables witch holds a text, and depending on the input i want to move this text to another string variable. How can I do this? I have made a small suggestion, but this does not work.. I use the INT move instruction, but ofcourse I have strings not INT's .. But I dont have a String move instruction available as far as I can see. I use CME 5.0, and VersaMax PLC, using Ladder. Hope to get som hot tip from you folks.. Best Regards Hans

Share this post


Link to post
Share on other sites
The MOVE instruction copies the bit pattern from the source to the destination. It is up to you to interpret what the bit pattern means.

Share this post


Link to post
Share on other sites
hapetter You should post your quesitons on plcs.net, similar to this forum but people actually answer the questions you ask!

Share this post


Link to post
Share on other sites
Steve answered this question, that doesn't count? People answer your question on mrplc.com if you ask the right questions in detail.

Share this post


Link to post
Share on other sites
Hans, I think what you are looking for is an DATA INIT ASCII function, which I believe is only supported in a 90-70 CPU. This would copy ASCII to an %R register. "This function is supported by revision 4.0 or later 90-70 CPUs."

Share this post


Link to post
Share on other sites
Hey chako, you shouldn't have to defend Steve for giving a useless answer to what he probably believed to be a stupid question in the first place; we all have bad days. The main thing is that Hap got is answer, right? All I am saying, is give peace a chance.

Share this post


Link to post
Share on other sites
Hi folks I have found a solution:) I using the Array move byte function. PS! I use VersaMax plc and this does not support DATA INIT ASCII function... Hans

Share this post


Link to post
Share on other sites
It looks like the answer came from here: http://gefanuc.bnsi.net/eforum/showthread....=&threadid=3802

Share this post


Link to post
Share on other sites
I got hung up on the String vs INT aspect of the question. Russ, over at the GE Fanuc forum was sharp enough to identify the real question as being about indexed addressing. I'd have more respect for your criticism, guest, if you would register and identify yourself. Any jacka$$ can take anonymous potshots. I'm not calling you a jacka$$, just pointing out that you're exhibiting behavior that could lead a person to the conclusion that you are.

Share this post


Link to post
Share on other sites
Calm down Steve, I wouldn't want you to have a stroke and die . We need people like you here.

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
Sign in to follow this  
Followers 0