rs logix 1400

If you are using the ACI instruction, remember that it will try to read a string until it finds a non-numeric character, regardless of how many characters that may require it to read. If your string is longer than 82 numbers, then you will get the invalid length error message. You first might need to do some additional operation, such as AEX to extract only part of a long string to be converted, or ASC to search a string for a certain beginning character or number.
ACI [String to Integer]
Rockwell Software
Use the ACI instruction to convert an ASCII string to an integer value between -32768 and 32767. This instruction sets the arithmetic flags (bits 0-3 in the processor status file S:0).

Entering Parameters
Source is an ST (string) file that contains the string data to convert.
Destination is the address location where the converted integer value is stored.

Operation
1 The ACI rung is enabled.
2 The processor searches the source for the first character between 0-9. All numeric characters are extracted until a non-numeric character or the end of the string is reached. Action is taken only if the numeric characters are found. If the string contains an invalid length (<0 or >82) the ASCII Error bit S:5/15 is set. Commas and sign(+,-) are allowed in the string. However, only the minus sign is displayed in the data table.
3 The extracted numeric string is converted to an integer. The ASCII Error bit S:5/15 is set if a numeric overflow occurs or if the string contains an invalid string length.

Arithmetic Flags
S:0/0 - Carry bit (reserved)
S:0/1 - Overflow bit sets if the integer value is outside of the valid range.
S:0/2 - Zero bit sets if the integer value is zero.
S:0/3 - Sign bit sets if the result is negative
.
 
Last edited:

Similar Topics

Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
22
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
87
Hi, I'm having an issue with a mircologix not transmitting out. The current setup is a mircologix 1400 connected to a Guardian 100 Radio...
Replies
1
Views
109
Hi, I am working with a Micrologix 1400 model 1766-L32BXB. With no input wires connected to the “in12” thru “in19”, I am getting 24 volts while...
Replies
4
Views
221
Hi everyone, I hope I don't butcher this up, please feel free to critique me wherever if I do, I have an issue I would equate to "chasing...
Replies
4
Views
300
Back
Top Bottom