RSLogix / BTD / Scaling

dalporto

Lifetime Supporting Member
Join Date
Jun 2021
Location
Montreal, QC
Posts
258
Hi all.


I'm working on a rehab and I'm trying to figure stuff out.


See screenshot at the bottom.


Local:5:I.Data[6] in BTD instruction is a data point coming from a DeviceNet 32 bits DINT. The instruction is reading half of it (length 16), so basically it looks this block is switching register order, but I may be very wrong with my understanding. Anyway that's not really the point here.


So I got a 832246557 value going to a 4983 value.


Then they put a multiplier to scale the value to the ENG units. I think it's kPa here but that's not important for now.


What I'd like to know is if I can find out the actual 0-100% scaling from that and how I could calculate it from that information, if it's even possible.


Not sure if this is the proportional of an INT value using 2 147 483 647, which would possibly give a 735 kPa transmitter, a little over 100 PSIG.


If you have any insight on what is actually happening there, please share.

Sans titre.jpg
 
The decimal representation shown on Local:5:I.Data[6] as 832246557 is meaningless. What you have is 2 x 16 bit analogue signals being read as a single 32 bit integer. The BTD instructions are copying the lower 16 bits and the upper 16 bits to new addresses so they can be manipulated. You could work out the scaling if you have some known points or now the resolution of the analogue.
 
What I'd like to know is if I can find out the actual 0-100% scaling from that and how I could calculate it from that information, if it's even possible.
100% of what?

The best we can do is put an upper limit on the instrument range. With 16 bits in the pressure's raw count value, the maximum raw range is 0-65535. Given that the EU scaling is 0.064851kPa(?)/raw_count, the maximum range is 4250kPa (= 65535 raw_count * 0.064851kPa/raw_count). That would imply 16-bit Analog to Digital Conversion (ADC) of the transducer (voltage?) signal, which is rare. 14- or 12-bit ADC are more common, also 10- or 8-bit. Because the 16-biot raw count value is greater than 4096 (= 212), this is probably not a 12-bit ADC or less. So the available range is likely 14-bit i.e. 0 to 16383 (= 214 - 1). It could also be a 13-bit ADC i.e. 0 to 8191. The maximum possible range for each of those would be

  • ~1063kPa (14-bit; 0.064851 * 214)
  • ~531kPa (14-bit; 0.064851 * 213)
That is only the possible range; the actual instrument range could be much less e.g. you suggested 735kPa, which would correspond to 11334 raw counts (= 735 ÷ 0.064851), which would require at least a 14-bit ADC, and throw away the upper 5k raw counts of the range.

If you have any insight on what is actually happening there, please share.

As noted by @chelton, the decimal representation of 832246557 is meaningless.

The 32-bit DINT Local:5:I.Data[6] from DeviceNet comprises two 16-bit values: the pressure raw counts; the temperature raw counts. Those two 16-bit raw count values have been essentially concatenated and placed into the 32-bit value by shifting the temperature's raw counts' bits 16 bits to the left.

832246557 (decimal) is equal to 0x319b131d (hexadecimal; also expressed as 16#319b131d). Each hexadecimal digit represents four bits, so the two 16-bit integers are

  • 0x319b from the 16 high bits (temperature) 16-31
    • 0x319b = 12699 (decimal)
  • and
  • 0x131d from the 16 low bits (pressure) 0-15
    • 0x131d = 4893 (decimal)
It boils down to bookkeeping.
 
Ok, I understand a little better now.


I'll start over from the beginning just to make sure sure that we are on the same page.


They have an AI 1793-IE4/A module on a remote 4-20mA IOFlex rack that they are getting values from a DNB DeviceNet Scanner on a L71 rack.


So far, from what I'm seeing in RSNetWorx is that there is no way to do any scaling in there.


Which means that the same 12 mA (or any signal) signal on any of the four channel would give the same exact value on let say Local:5:I.Data[6]-0 or Local:5:I.Data[6]-16 in the destination of the BTD. Right?


With that in mind, if I know the maximum value that could get in the destination of the BTD, I should be able to know the scaling of the instrument since the "scaling" they used is a simple multiplication.



So, is there a way to calculate, or to know what is the maximum range that is possible (on Destination) knowing that what is coming out from the 1793-IE4/A is a 2 bytes register?


Basically, what would be the Destination value when the signal is 20mA?





Is there any information from the .dnt config that would help?
 
Provided the module is configured for 4-20mA at 20mA you would expect to see a value of 30840.
See in the manual page 69
1793-um001


Yes, this is good stuff, this is something like I was looking for.



That would give a 0-2000 kPa transmitter.


I like that this calculation gives such a round number, but at the same time this would be the first time that I see a pressure transmitter bought or scaled in kPa, and the choice would be odd to use such an overkill range to run at 300 kPa but that wouldn't be the first time I'd seen it.


I'm gonna cross check with the other values to see if this is making sense, but it looks good.


Thank you very much.


I checked a lot of general "FLEX" literature, but forgot to look right at the source.


Mea culpa.
 
Yeah, next one is a temperature that gives 0-100C.


Thanks again!


Edit: Next one is 0-150 PSIG.


Yeah, you got it.
 

Similar Topics

Hello everyone! I am working on an existing system that contains a 1756-L73 controller, a 1756-DNB DeviceNet bridge, and a 2711-K3A5L1 PanelView...
Replies
4
Views
2,785
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
87
Hi folks, in the alarm manager of Rslogix 5000, the tag-based alarm has been created. But when I tried to change the condition, it was found the...
Replies
2
Views
157
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
3
Views
170
Back
Top Bottom