| Home » Categories » Multiple Categories |
How do I deal with an unsigned integer in an SLC, PLC5, or MicroLogix processor? |
| Article Number: 306 | Rating: Unrated | Last Updated: Tue, Sep 29, 2015 at 12:24 AM |
|
Scenario: A device that uses an INT value to represent a range of 0 to 65535, but in the processor the INT tag has a range of -32768 to 32767. Since the A/B processor does not have an unsigned Integer data type, you will need to convert this value to represent the full range. Simply take your data value and do a masked move (MVM) into a float tag. Your mask will be 16#7FFF. This will move the least significant 15 bits into the Float tag. Then if bit 15 is set within your original INT tag, add 32768 to the Float tag. This will allow the value to display with a range of 0 to 65535. |
Attachments (0)
There are no attachments for this article.
|
Comments
There are no comments for this article. Be the first to post a comment.
|
My 3150-MCM is configured to have no Write Data, only Read Data. Occasionally, I am seeing my data overwritten with what appears to be configuration data.
Viewed 1 times since Tue, Nov 28, 2006
Can the MVI46 or 3150 modules be placed in a remote rack?
Viewed 1 times since Tue, Nov 28, 2006
I am using a ProSoft MVI46 solution and I am getting a Fault Message that says, "Specialty I/O Module in Slot x has not responded within the time limit." What can cause this?
Viewed 1 times since Fri, Oct 31, 2008
What is the difference between 3150-MCM and 3150-DFM?
Viewed 1 times since Tue, Nov 28, 2006
What is the difference between the 3150-MCM and the MVI46-MCM
Viewed 1 times since Tue, Nov 28, 2006
My MVI46 module faults the processor after cycling power to the rack.
Viewed 1 times since Tue, Nov 28, 2006
Is the DH-485 port on the 3150 module available for use?
Viewed 1 times since Tue, Nov 28, 2006
How to enable Modbus commands in MVI46-MNETC
Viewed 1 times since Wed, Sep 24, 2014
I am unable to view the Debug Menu on my MVI71-DNP module.
Viewed 1 times since Tue, Nov 28, 2006
Debug port connection parameters for Prosoft modules and gateways
Viewed 1 times since Tue, Nov 28, 2006
|

Add Comment