Sign in to follow this  
Followers 0
pszczepan

FB and format type output

4 posts in this topic

Hi ! I have simply FB to convert values from SCADA to format which I need. It is just binary multiplication. The input is UINT and outputs I made a DWORD. The problem is that internal registers got the values (watch window at the bottom) ,but only my first output has correct value; rest are "0" Probably the problem is because datas are 16 and 32 bits, but if I made output as a word data Cx-P gives me error. What is the solution? Pawel

Share this post


Link to post
Share on other sites
Without knowing the internals of your function block it looks to me that your outputs D606, D607 and D608 should be changed to D606, D608 and D610. They are DOUBLE WORDS!!

Share this post


Link to post
Share on other sites
Thanks - you are right I have to set the outputs as you wrote - I cannot use D607,D609 - in my application always they are 0, but I loose them.

Share this post


Link to post
Share on other sites
Not sure from your comment if your problem is resolved!! From your picture the function block will pass data from FB Memory to D Memory as follows:- H892 = 0000 00FA. If output is D606 then D607 = 0000 and D606 = 00FA H894 = 0000 00AA. If output is D608 then D609 = 0000 and D608 = 00AA H896 = 0000 64C8. If output is D610 then D611 = 0000 and D611 = 64C8 Are you saying that this is NOT happening? Are you sure you SURE you are not writing to these data areas somewhere else in your program???

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