×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Number formats in PLCs

Number formats in PLCs

Number formats in PLCs

(OP)
I'd like to find out what number formats are in use in a representative range of PLCs. I guess there's nowhere better to ask ???

We're reading values out of them across modbus. I want to know what possible formats I an expect to meet.

I don't know how much flexibility the PLCs give to the programmer when setting stuff up.... can you specify the number format for something, or are you terribly restricted?

I can conceive of meeting any of the following... anyone able to say "never" or "always" to each?

unsigned 16-bit integer
  signed 16-bit integer
         16-bit integer with 8000h as zero
unsigned 32-bit integer
  signed 32-bit integer
         32-bit integer with 80000000h as zero
unsigned 64-bit integer
  signed 64-bit integer
         64-bit integer with 8000000000000000h as zero
         32-bit floating point
         64-bit floating point

Thanks for any help you can give.

David

RE: Number formats in PLCs

I think that you covered most possibilities. Some also use "IEEE 32 bit floating point". I do not have that spec in my head. But should be available if you google it.

Two's complement always used for signed integer.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Number formats in PLCs

(OP)
Thanks Skogsgurra,

I meant to say IEEE 754 - I can never remember either.

Are you saying that I might encounter all of them, except the non-2-s-complement signed stuff?

Do some PLCs really have 64-bit fpt? I know it's what PCs default to these days, so I guess PLCs will not be far behind....

David

RE: Number formats in PLCs

Well.. I said that you had covered most of the possibilities. I am not so sure that 64 bit fp is used, though. Not yet. But I haven't seen them all.

If you encounter them - and in what form - depends on where you look. If you are communicating via Profibus, you may see all number systems that are used by the objects on the bus. I usually only see unsigned 16 bit integer, signed 16 bit integer and 16 bit vectors containing status bits.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Number formats in PLCs

(OP)
Thanks -

I've got a flowmeter in front of me that uses 32-bit fpt, and heaven help me, ASCII strings in modbus registers.

I don't THINK it uses signed integers, but I haven't looked at all 100 registers yet sad

David

RE: Number formats in PLCs

Omron have 64 bit floating point to the IEEE 754 standard and have had for some years now.

How about BCD?

RE: Number formats in PLCs

(OP)
Thanks OldPfart

I'm just going to hope that we never come across anything in BCD.

What Omron models feature this 64-bit fpt then?

RE: Number formats in PLCs

"I've got a flowmeter in front of me that uses 32-bit fpt, and heaven help me, ASCII strings in modbus registers.

I don't THINK it uses signed integers, but I haven't looked at all 100 registers yet "


I know from past experience if you can put ASCII into a SINT (short int <<AB term) or a byte.  Then data manipulation is easier, otherwise your have these characters that might need swapped or pad the odd 1/2 word of your INT.  

Just a thought.

RE: Number formats in PLCs

Omron CJ1, CS1, NSJ, CPiH, CP1L all share a function set including 64 bit floating point.

Nothing wrong with BCD by the way. In the above PLCs you can select all timers and counters to be BCD or decimal for example. Most electricians understand BCD rather than decimal or hex. I am glad octal has all but vanished though. I do not know if it is still used in any PLCs but it was once.

RE: Number formats in PLCs

"Most electricians understand BCD rather than decimal or hex. I am glad octal has all but vanished though."
BCD is numeric format - it describes what is meaning of bits in bit string.
Hex, decimal and octal as well as binary are forms of presenting bit strings.
And god save us from electricians who can't understand decimal numbers (btw, how they know how much do they earn ?)

Regards,

Jacek

Do it right or don't do it at all.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources