| 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.
								   | 
| 
										When using the sample ladder I get an M0/M1 file reference error in my SLC processor if the MVI46 or 3150 is not in Slot 1.
										 Viewed 1 times  since  Tue, Nov 28, 2006  
										Do you have an in-rack Ethernet I/P solution for a PLC-2 processor?
										 Viewed 1 times  since  Wed, Jan 21, 2009  
										IEC-60870-5-104 Server Tutorial
										 Viewed 1 times  since  Mon, Sep 3, 2012  
										How can I store my RSLogix500 program in a M13 EEPROM installed in a ProSoft 3250-L532M SLC processor?
										 Viewed 1 times  since  Wed, Dec 3, 2008  
										Which of your products support RS-485 serial protocols?
										 Viewed 1 times  since  Wed, Feb 6, 2008  
										Where do the MVI69E/L Modules store their configuration?
										 Viewed 1 times  since  Mon, Jul 7, 2014  
										What is the difference between 3150-MCM and 3150-DFM?
										 Viewed 1 times  since  Tue, Nov 28, 2006  
										What are the advantages of the MVI46-MCM compare to the 3150-MCM?
										 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  
										My 3150-MCM block IDs are incrementing until I connect the communications cable. Once the cable is connected, the block ID stops incrementing.
										 Viewed 1 times  since  Tue, Nov 28, 2006  | 

 Add Comment
 Add Comment
 Subscribe to Article
Subscribe to Article Print Article
Print Article Email Article to Friend
Email Article to Friend
							 Export to PDF
Export to PDF Export to MS Word
Export to MS Word Tweet This Article
Tweet This Article Digg It
Digg It Stumble Upon
Stumble Upon Del.icio.us
Del.icio.us