pszczepan Posted October 17, 2008 Report Posted October 17, 2008 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
BITS N BYTES Posted October 17, 2008 Report Posted October 17, 2008 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!!
pszczepan Posted October 17, 2008 Author Report Posted October 17, 2008 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.
BITS N BYTES Posted October 17, 2008 Report Posted October 17, 2008 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???
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now