Sign in to follow this  
Followers 0
RheinhardtP27

String Data

11 posts in this topic

Hi All, Im a Siemens programmer being thrown into the wonderfull world of GX Develper IEC. I have some question... I need to move and copy a string within the PLC , actually the idea i to create a buffer area with 2 fields. Ex. String1 String2 XXXXXXXXXXXXXXXXXXXXXXXXXXXX 2384756 Question 1 How can i move the complete string typically i would have used BLOKM in the siemens. Question 2 How can one compare a string in the IEC software. Any guidance assistance will help. Rheinhardt

Share this post


Link to post
Share on other sites
Sorry i forgot to mention, i use the FX3u series PLC.I also use the GX Developr IEC version of the software for the FX series. The idea is to connect the unit to a barcode scanner and to then compare the data out of a buffer. Once i have compared and found the data i delete it and shift my buffer. Many Thanks Rheinhardt Edited by RheinhardtP27

Share this post


Link to post
Share on other sites
Hello, Look up the instruction BMOV. It is a block move that I think should be similar to the Siemens instruction. plcdp

Share this post


Link to post
Share on other sites
Q1: Instruction "STRING_MOV_M" Q2: Comparing strings is a bit more difficult. You'll have to convert the strings to words and compare them. To convert from string to word use the BMOV_E or BMOV_M instructions....

Share this post


Link to post
Share on other sites
The FX3U supports special instructions which work with string variable (FNC 200-209). I think you can use VAL instuction for conversion String to BIN and then use BKCMP function for comparision of two data block. If I'm wrong, please correct me colleagues

Share this post


Link to post
Share on other sites
Thank you for your prompt replies. I will do some testing and revert back to the forum. RP

Share this post


Link to post
Share on other sites
Hi Gents, I have done some testing and have a problem. What is the maximum allowed String lenth in the GX Devloper IEC Global variable definition. I have a string which is 17 characters, when i try and move data using the String_MoV_M instruction only 16 characters get transferred. Is the limitation in the definition of the string or the String_Mov_M funtion. Has anyone managed to move large amount of characters. Rheinhardt Edited by RheinhardtP27

Share this post


Link to post
Share on other sites
See here (one thread is enough ): http://forums.mrplc....=0&gopid=101952&

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