Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2012, 02:46:52 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: BARCODE READING THRU fo-CP128 MODULE  (Read 654 times)
JBYERS
Newbie
*
Posts: 2


« on: December 10, 2009, 04:42:49 pm »

I am reading 2 barcodes thru a focp128 module the information is being written to 2 different v memory locations I need to verify the barcodes match but only a select portion of the barcode, the ANSII format stored in V-mem only allows me to verify pairs of numbers and I may need to verify on an odd character start position in the barcode string, i tried splitting the code with OutL and OutM instructions this did not work consistently and would require lots of code, and the code length is variable, any suggestions greatly appreciated.
Logged
b_carlton
Internal Dev
****
Posts: 388



WWW
« Reply #1 on: December 10, 2009, 04:52:36 pm »

You might think about performing the matching tests in the BASIC module. Its string handling capabilities are much greater. Then pass a Go/No-Go signal back to the CPU. If you are matching against a number of possibilities you could also pass a number corresponding to which item matches. You will still have some complex code, but that's the price for a complex operation.
Logged

An output is a PLC's way of getting its inputs to change.
Controls Guy
Internal Dev
****
Posts: 1134


Darth Ladder


« Reply #2 on: December 10, 2009, 06:28:45 pm »

I agree with Bernie.  Dealing with string in ladder is a pain, especially if there's a basic module available.  That's a much better way to go.
Logged

I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.
JBYERS
Newbie
*
Posts: 2


« Reply #3 on: December 11, 2009, 08:22:36 am »

I am very new to the basic module is there a good resource for learning the programing basics, I generally poke around with the Directsoft ladderlogic to solve problems in existing programs and eventually find solutions by trial and error, this has led me to creating new systems and each scenario seems to get more complex.
thanks again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM