String Comparison in Mitsubishi FX3U PLC?

Domomod

Member
Join Date
Nov 2012
Location
Southern IN
Posts
3
Hello all,

I need to compare the first three digits of a barcode string to a known value.

I have the string being pulled from the Serial buffer, and placed into memory.

I found the instruction " $= " in the GX Works 2 help as a string comparison. But it seems like the FX3U PLC does not support this instruction.

If I can't use the string comparison, what are my alternatives to compare these values?
 
If I can't use the string comparison, what are my alternatives to compare these values?
I did not look up the manual for the FX3U, but the usual alternatives for manipulating strings are:
(1) use a string or ASCII instruction that extracts (separates) the first 3 characters and places them into a new string, or
(2) use a string instruction that searches the string for certain characters, or
(3) use a string instruction that compares two strings, AND
(4) use a string instruction that converts a string to an integer number value, AND
(5) compare the new number value to a known value, using a EQUAL, LESS THAN, or GREATER THAN comparison instruction.

Look in your PLC Help file (or your PLC programming manual) for string or available ASCII instructions.
 

Similar Topics

Hello! I have review PLCS at least half a dozen times and it occurred to me I might be able to crowd source a solution for something I have been...
Replies
1
Views
2,988
Hi, i am trying to compare a string value in an IF statement My string value is user defined string called Barcode_String max characters 26...
Replies
6
Views
7,300
Hi There, I am programming a cmore EA9-T87 to gather the data and save on SD card. And this time I want to use barcode scanner to trigger the bit...
Replies
2
Views
3,499
Good afternoon to all. I'm new guy on this forum. I'd like to ask you for help with task like this: My boss gave me a program to modification...
Replies
12
Views
12,915
Hi Is there an instruction for string compare mode in SLC5/05? cos I wanna compare two descriptions. Thanks in advance gorillaz_sg
Replies
3
Views
1,906
Back
Top Bottom