Sign in to follow this  
Followers 0
Yair

Using sum(184) fsc max in CJ1G cpu45

11 posts in this topic

Hi &Thanks for your help! I'm Using plc CJ1G-CPU45 IN 3LAYERS BLOWING FILM LINE I'm using some sum(184) instruction When i add 16 binary data this instruction werking proprly for exmple: sum(184) #0000000F D0 d5996 When i use it to sum a 10 BCD data for exmple sum(184) #4000000A D100 D6996 somtimes The instruction error flag CF003 is on and somtimes it is working proprly I make sure the data in d100-d109 is Bcd note: i'm using also FCS instruction evry 2 mili sec in interrupt ruttin Is there is Anything else that i have to do ? Thank you for your help

Share this post


Link to post
Share on other sites
Yair, I tired the SUM function, using a 0.02 clock pulse, then with an always on bit, scan time was 0.8ms. Used a ++ function with the associated error flag to count number of times it bummed out. But the it seems to work just fine........Could you give me more details on the FCS...alternatively send a copy of the prog via email to me, i'll load it and see if i get the same results.

Share this post


Link to post
Share on other sites
TRY THIS FILTER IN THE ATTACH SUM(184) THANKS YAIR

Share this post


Link to post
Share on other sites
Does Anybody try the sum(184) instruction to add BCD data? In the CJ1G-H CPU45 THANKS

Share this post


Link to post
Share on other sites
Yair, I don;t have a cpu45 handy but i did have a cj1mcpu22. I loaded the porgram. Had to change the E address though to a D address. The sum function worked fine. No errors. I am a little bit perplexed as to what you are using the SRD for straight after the SUM function. Sorry i could't replicate the same errors. Could you explain to me why you are using the SRD. if it is just to truncate the last digit of D5996 then might i suggest the MOVD function instead...

Share this post


Link to post
Share on other sites
I add 10 bcd data of the anlog input and the divide it by 10 with using the SRD instead of /B this is a small 10 result filter when i used 1 sum instraction in the program there was no error i'm in installtion of a new big project 3layers blowing fillm line and i'm using at least 35 sum instraction maybe it is somthing else in plc that cause this problem i tried to find what cause this error unfortunately i only found that using sum and than agin sum in the ladder program the second sum always executed with no error note: I'm using this trick only when i add bcd data

Share this post


Link to post
Share on other sites
Therefore if u are still having troubles might i suggest that u do the sum in binary(decimal) then convert the result with BCDL before the SRD instruction.

Share this post


Link to post
Share on other sites
Hi and thanks for your help I'm using d5995 in order to rounding off the result number for example after sum d5997 =0003 d5996 =1578 d5995 = ???? after SRD d5997=0000 d5996=3157 d5995=8??? after cmp d5995 to #5000 it is not less than so i add 1 to final result d253=3158

Share this post


Link to post
Share on other sites
I also said in my last post Does this work ?

Share this post


Link to post
Share on other sites
yes it is working thank you

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