s5 to fc82

aps81

Member
Join Date
Jul 2013
Location
greece
Posts
3
when i migrate a s5 to s7 project

i get the following

call fc82
(dual:=DW62
SBCD:=Q16.0
DCD2:=QB16
DCD1:=DBW64
);

and i get an error where its writing dual:=dw62

can somebody help me how to translate it correct in s7
 
In S7 you don't have DWxx you use DBWxx

Also, due to the difference in addressing in S5 you'll need to double the DW values so DW1 becomes DBW2,
DW2 becomes DBW4
DW3 becomes DBW6
etc etc
DW62 becomes DBW124

You've also got DBW64 in your example so I'm wondering if you are getting muddled up with this?

If memory serves me FC82 is a special block in S5. There is an S7 equivalent in the library (under something like S5-S7 converting blocks or something).

;-)
 
thank you for your reply

i made a mistake they are dbw after the translation
but i still have the mistake

the code is like that
call fc82
(DUAL:=DBW62
SBCD:=Q16.0
DCD2:=QB16
DCD1:=DBW62
);

THE MISTAKE IS AT DUAL:=DBW62
 
I have used the converter
after the conversion i get this mistake

if i make it as a comment the error disapear
but i think i need to use this code in s7
 
Hi,

FC82 is a special block that Converts 16 bit binary number to BCD.

If the converter has given you DBW62 then you'll find that in the S5 software they'll be DW31 which is fine.

You'll need to ensure that you have FC82 in your project. You can call it from Libraries - Standard Library - S5-S7 Converting Blocks - FC82

;-)
 

Similar Topics

Hi all, I'm in the middle of doing an S5 to S7 upgrade. The old S5 software used FB241 (convert binary to BCD), FB 242 (multiply 2 binary...
Replies
14
Views
6,782
Hello everyone, I have a problem converting S5 COD:16 (FB241) into S7 (FC82). When compiling the source file, it displays error for the 'DUAL'...
Replies
1
Views
3,654
Back
Top Bottom