Accessing bits in a REAL in Logix Designer

zacslade

Member
Join Date
Oct 2014
Location
Phoenix, AZ
Posts
84
Hi all,

This has been bugging me for some time, but it is only recently advantageous for me to have an answer. I know that REAL values are designed to be used for analog values, but that they are ultimately stored as binary.

I am working on a 1769-L33ER in Logix Designer, and I want to access the bits in a REAL tag. Is there any way to do it?

Thanks!
 
I don't think there is. I've had that thought before too, and had a look to see if there's a way to do it, and never found one.

Having said that, I'm going to lurk here and watch for a while, because if anyone has done it, this will be where you find them ;)

One question though - what's the situation that's made it "advantageous for you to have an answer"? I'm curious :)
 
One question though - what's the situation that's made it "advantageous for you to have an answer"? I'm curious :)

Haha - It's not terribly advantageous, just a little.:ROFLMAO: I am pulling a large number of tags from a single modbus device, through a Redlion DSPLE. Since Redlion's Crimson software doesn't import the AOIs I'm using, I figured I'd make a large array to hold all the raw values, and then map them to the AOIs.

All but two of the values I'm pulling in are IEEE 754 Floating Point, so I had to make another tag to hold those last two integers. :cry: It ruined my tag structure.
 
zacslade said:
All but two of the values I'm pulling in are IEEE 754 Floating Point, so I had to make another tag to hold those last two integers. It ruined my tag structure.

You know, I think you and I would get along well! :ROFLMAO:
 
not sure exactly what you're trying to accomplish - but you might want to try this idea ...

use a COP (Copy) instruction to take a REAL number and copy it into a DINT location ... you should be able to address/access the individual bits within the DINT ...

SECRET HANDSHAKE: a MOV instruction moves a VALUE ... a COP instruction on the other hand moves BIT PATTERNS ...

DISCLAIMER: I don't have a Logix system handy here at home - but I know that I've done this before with the older platforms ...
 
Originally posted by Ron Beaufort[/b]:

DISCLAIMER: I don't have a Logix system handy here at home - but I know that I've done this before with the older platforms ...

Yep, still works.

But I'm still not sure why you want direct access to the individual bits.

Keith
 
Hello,

...but that they are ultimately stored as binary.

Not to be pedantic; "stored as binary" could be interpreted as "bit weighted" or each bit has a value and all the bits added together have a value.

Floating point numbers are encoded. IEEE 754 is a common encoding.

So, floating point numbers are not really stored as binary. They are values that are encoded and saved.

Depending on why you want to access some part of the encoding, there might be much easier/faster/cleaner methods.

You might know all the above. If so, never mind.

My2c.
 
Code:
COP MyReal MyDint 1
XIC MyDint.[MyIndex] OTE BitOneIsOn

You could roll this into an AOI to access the bit if you don't want to add a program or controoler scoped tag
 

Similar Topics

A scale module the PLC communicates with feeds back a double word (DBD) that contains status information: 32 defined status bits. In this case it...
Replies
3
Views
4,857
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
5
Views
49
For the past few day, I have had problems accessing the Rockwell Knowledgebase. When I try to access it (and I do have a TechConnect Support...
Replies
7
Views
394
Hi, Small issue i've really been beating myself up over today. I've been working with Panelview panels for years. Currently working on an older...
Replies
1
Views
586
Dear experts, I have the following setup: CPU-313C (6ES7313-5BF03-0AB0 V2.6) + CP343-1 (6GK7343-1EX30-0XE0 V2.0) communicating with Siemens PC...
Replies
7
Views
2,670
Back
Top Bottom