mitsubishi fx3u conversion

johnfarrugi

Member
Join Date
Mar 2008
Location
London
Posts
99
I am working on an fx3u mitsubishi PLC were I am reading the upc code from a label and storing the values as follows in ascii format:

D101 - 01
D102 - 65
D103 - 06
D104 - 22
D105 - 34
D106 - 13

I'd like to convert the above ascii values into a single decimal register as follows

D200 - 16506223413

How can I do this using the FX3U instruction set?
 
That number is too large to fit in a 16 bit register or even a 32 bit register we need to know what you are going to do with a decimal number so large?.
Most bar cobe handling uses comparison of the ascii chars or send to a database etc, so no need to convert to a decimal
 
That number is too large to fit in a 16 bit register or even a 32 bit register we need to know what you are going to do with a decimal number so large?.
Most bar cobe handling uses comparison of the ascii chars or send to a database etc, so no need to convert to a decimal

I will be comparing the value read by the barcode scanner to the value of the upc code that it is suppose to read... in other words the value read by the scanner will get compared to a constant if the vales are equal the machine will continue. if they are different the machine will stop.
 
Can you not just split the constant down into some other registers in the same format that the barcode scans in then compare all the registers ?

Constant:

D301 - 01
D302 - 65
D303 - 06
D304 - 22
D305 - 34
D306 - 13

Scanned:

D101 - 01
D102 - 65
D103 - 06
D104 - 22
D105 - 34
D106 - 13

IF D101 = D301 AND D102 = D302 etc. etc. THEN BARCODE CHECK = TRUE
 
You could do a CMP this compares a 16 bit word i.e. D100
( CMP D100 D200 M100)
if D100 are the same as D200 then M101 will be on (M100 is on if D100 < D200 M102 is on if D100 > D200
The compare instruction uses 3 bits for the compare starting at the head address in this case M100
 

Similar Topics

I am working on a project that currently has a 64mb FX3U Mitsubishi running at a scan rate of 88ms. In order to improve the scan rate we are...
Replies
0
Views
4,635
Bonjour, Je n'ai pas de communication modbus RTU vis la configuration ci-dessus. J'ai essayé les deux mode ch1 et ch2 mais rien ne fonctionne...
Replies
0
Views
164
Hello everyone; I have Mitsubishi PLC FX3U 32M in hydropower plant governor, an error message popped up when a technician was working on an...
Replies
2
Views
368
hmi keeps saying "insufficient sensor failed" after the machine runs for 60 seconds. its a fx3u-48m PLC. The plc is not giving any errors or...
Replies
14
Views
2,257
Hello All, I have been trolling through the Proface documentation to find an answer, but I read conflicting information. We have a...
Replies
8
Views
3,907
Back
Top Bottom