L23E Compactlogix Noisy Analog Input

That's so crazy! How am I supposed to know 0-6 need to be masked? Is there a manual on this?
The 1769 CompactLogix Packaged Controllers Quick Start and User Manual, under 'Additional Resources' directs you to the Compact 8-Bit Low Resolution Analog I/O Combination Module User Manual, stating that: "This manual provides further detail regarding the use of the 1769-IF4XOF2 module and the embedded analog I/O."

That manual then shows the layout of the input data file, with 0-6 as zero, 7-14 as data, and 15 as SGN.

It does claim that bits 0 to 6 are 'permanently set to zero by the module' however, which is apparently not true (at least for inputs that are embedded in the controller).

So it doesn't exactly tell you to mask them, but it certainly does show that bits 7-14 are the actual data you should be looking at.
 
Also just to note...

Ignoring the requirement for masking and just scaling the value as-is *should* work, for all intents and purposes, because if the module was behaving as expected, bits 0-6 would always be zero and you would still always be scaling proportionally. Your raw value would be 128 times greater right across the scale, thanks to the bit shifting - but raw values are unitless, so whether 0.1mA correlates to 1 count or 128 counts, as long as it's consistent across the scale, you scale it the same way. You just use different scaling constants.

Of course, the module is not behaving as the manual describes (i.e. bits 0-6 are not always zero), which means your scaling will still *work*, but you can see what you perceived as "noise".

So, there are two parts to this:
1. Why is this module setting bits that should always be zero, to not zero? This could be due to a faulty module, perhaps?
2. You can ignore the unusual behaviour in #1 by properly conditioning your analog input to look at only the bits that represent the analog input. This does not resolve the issue described in #1, it only masks the problem - but if the analog input is otherwise performing according to requirements, you will get rid of the "noise" and the system will continue to operate as accurately as an 8-bit analog input ever could
 
Its happening at multiple sites. I knew glazing over binary would someday pay me back but I haven't had a lot of issues in that way. I'm not even sure how to mask the raw data coming in. Really I am more of an instrument tech and all the programming I have done has been basic process contorls. Im a total rookie.
 
There are plenty of ways to remove the hide from this feline.

#1 way I'd try would be the BTD instruction (Bit Field Distribute - if you squint a bit the acronym almost makes sense). It's designed to do exactly this - move a bunch of relevant bits into a new integer, leaving the irrelevant bits behind. You would grab bits 7-14 from the input data image, and put them in bits 0-7 of a regular integer. Then you scale that regular integer as 0-255 (although you still need to work out what value represents 4mA and 20mA - I think drbitboy did that in an earlier post?). For maximum confidence, I would put a CLR instruction before the BTD instruction, to set all the irrelevant bits to zero before moving in your data.

If the BTD is not available in that processor, you could:
1. Perform an MVM (masked move) to move only the relevant bits to a new integer
2. Perform a bitwise AND to ignore all the irrelevant bits
3. Divide by 128 to shift all your bits to the right (you will have to handle the fact that bit 15 is always positive)
4. Use a bit shift instruction to move all your bits to the right (again, make sure to handle bit 15 correctly)

#1 and 2 would leave your scaling the same as it currently is, and just block out the "noise". 3 and 4 would leave you in the same state as using the BTD, with your value now 0-255 and requiring re-scaling.
 

Similar Topics

Hello everyone, Anyone know how to factory reset CompactLogix L23E?
Replies
1
Views
1,731
Hello,i need your help. I cant connect to a CompactLogix L23E, I tried via Ethernet and Serial too. The PLC has a IP configured, I have ping it...
Replies
3
Views
1,481
Hello everyone, we want to change IP address for used compactlogix L23E-QB1B controller ,it assigned a IP address before, but this IP address is...
Replies
14
Views
2,796
I am newcomer here, I bought a AB compactlogix l23e embedded i/o plc(used one) a few days ago. I made a stupid decision i think that I downgrade...
Replies
5
Views
1,646
I am trying to test a scanner application where I am converting RS232 to Ethernet IP, and then reading the results at an A-B compactlogix L23E...
Replies
5
Views
3,378
Back
Top Bottom