Sign in to follow this  
Followers 0
hipoint2

Controllogix 5000

40 posts in this topic

I would not be suprised if they were not here somewhere. I tried it on an L55. I'm not doubting you but apparently I'm just not following you. There is not chance that your destination bit was greater than zero or you length was greater than 16 is there. Or am I way out in left field

Share this post


Link to post
Share on other sites
I've got L1s and L55s doing BTDs in the same manner. Thats why I am confused. I may need to put something in mine to keep this from happening. But I got to make them do it first, thats why I'm trying to make sure I fully understand

Share this post


Link to post
Share on other sites
I did not follow this discussion from beginning, but as far as I know in every version of logix every time you put into the integer tag a value with bit 15 set, it will generate minor fault "Overflow". You may just ignore it or reset it. It's always recomended to use DINT for all calculations including 16 bit processing.

Share this post


Link to post
Share on other sites
Ok, guess I need to hunt and figure out how I have never managed to set bit 15

Share this post


Link to post
Share on other sites
Actually I was not correct: If you are using BTD, no overflow will be generated as this is just a bit pattern. Same with COP instruction, as it copies a bit pattern without checking a value. But if you are using MOV <DINT> to <INT> and DINT >32767, then overflow will be set, but result will be the same as BTD (Type 04) Program Fault (Code 04) Arithmetic overflow. Result of an arithmetic instruction out of range. Task: MainTask Program: MainProgram Routine: MainRoutine Here is definition: Overflow is set if the value you are storing cannot fit into the destination. Either the value is greater than the maximum value for the destination or the value is less than the minimum value for the destination. Edited by Contr_Conn

Share this post


Link to post
Share on other sites
Mellis - Is it possible that somewhere else you are manipulating that same integer or double integer somewhere else that is actually causing the minor fault? May be an ADD or MUL. Can you post a program?

Share this post


Link to post
Share on other sites
TW, I really don't think there is any difference in our code. Here is what I did to test: Went online with a L55 and added a rung in main routine with a BTD instruction only. (there was a program running already) BTD MyDINT 0 MyINT 0 16 Created two new tags MyDINT and MyINT of type DINT and INT. Accepted the rung. Entered a few numbers below 32767 into MyDINT and observed that they transferred to MyINT with no changes. Checked that I had no minor faults. Entered 32768 into MyDINT and observed MyINT showed -32768. Checked for minor faults and I had a program fault of exactly the type Contr_Conn described in his post, Arithmetic Overflow. Repeated the process a few times to verify it wasn't a coincidence. So, here's what we know at this point: It definitely faults a rev 12 L55. (I believe it faults a rev 11 L1, but I can't test it right now) It doesn't fault a rev 15 L55. (I believe you too) I'm leaning towards the idea that it got fixed in rev 13 or 15 but I can't confirm it without flashing the processor and the guy who is using it is not going to let me do that right now. The only other action I can do right now is call tech support, but I'm still going to want to see it with my own eyes before I consider it resolved. But I'm afraid I'll have to backburner that until I get access to a processor with newer firmware. If you get a chance to check it in a rev 11 or 12 processor before then I'm certainly interested in the results. Edited by mellis

Share this post


Link to post
Share on other sites
I will check revision notes to see if they change it from 12 to 15 Ver 15 works as I expected. Let me try the latest FW in ver12

Share this post


Link to post
Share on other sites
I will have to back flash one of my processors Monday but I know I have had that code in mine to do the BTD from a DINT to an INT since revision 10. I checked my logs today. I may have gotten lucky and bit 15 was never high but I am seriously doubting it. I will report what I find

Share this post


Link to post
Share on other sites
Here is what I found: Ver 12 and 13 and may be earlier(?) will set overflow minor error if using BTD instruction, Ver 15 will not set overflow bit This is apparent change in v15 (or maybe 14 - I did not test 14, but it should act like 15) COP instruction will not set overflow minor error in ver 12-15 (and may be earlier - I did not test) I went over release notes and did not find anything about this change. Edit: I did all testing with L63/A processor and current FW available for download from the website Edited by Contr_Conn

Share this post


Link to post
Share on other sites
Well after I look closely at my programs, the BTD that is doing this is used to send messages to older SLCs that don't support Long Integers. And guess what, I can't come up with a normal combination in my code that would have set bit 15. It's possible I dodged the bullet all this time.

Share this post


Link to post
Share on other sites
Hey don't say it too loud or someone will be after your pot o' gold.

Share this post


Link to post
Share on other sites
I know. I am never that lucky. I can find no code that intentionally keeps bit 15 from being set but I can find no scenario that would set bit 15.

Share this post


Link to post
Share on other sites
Contr_Conn, Thanks for taking the time to run the test and share the results. It's nice that they changed this in rev 15, but you would think it qualified for a revision note. I checked the revision notes too and came up empty.

Share this post


Link to post
Share on other sites
I did some research - this is considered as incorrect operation of BTD in earlier versions and v15 officially fixes this. It is not a functionality change Ii guess... Edited by Contr_Conn

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