Studio 5000: Changing REAL to DINT

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
I'm being directed to fill process values into an array of DINTs. A portion of the REAL values got copied into 2 DINTs each, but there are more REAL values than designated slots for them. So I was directed to multiply smaller REAL values by 1,000 and copy them into individual DINTs.

So, tonight I'm playing with test values on my CompactLogix L16ER to find the simplest way to do it before converting all the values. I expected to have to use a command to convert values, or at least remove the decimal values before coming up with the resultant DINT, but it seems I don't need to do any of that. I've been playing around with the conversion, however, and it's not perfect. The rounding seems odd... not always what I would expect it to be. But maybe for insignificant values, it is acceptable. But I should check with you guys... is this a good way to accomplish the conversion?

REALtoDINT.png
 

Similar Topics

I am in my freshmen year of college and just started interning at an industrial manufacturing company that uses Powerflex 755 drives for many of...
Replies
5
Views
2,416
I'm trying to configure the IP address of my compactlogix l16er-bb1b in Studio 5000. I need to set it to a certain address as I'm planning on...
Replies
5
Views
3,233
Good Afternoon , I have a Studio 5000 project that I would like to change from version 29 to version 28. I know how to use ControlFlash ...
Replies
4
Views
2,329
I'm trying to take an input signal (boolean, not analog), delay it for a configurable amount of time, then output it via an AOI using as little...
Replies
2
Views
2,408
Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me. I am doing a differential pressure calculation in a L27ERM...
Replies
15
Views
268
Back
Top Bottom