RSLogix 5000

1756-DHRIO Retrieve RIO Status Object

posted Jul 2, 2015, 2:24 PM by Darren Ash

The attached file shows and example of retrieving the RIO Status Object using a message and has an add-on instruction to coerce the unsigned data into the next larger data type so that negative values will not be displayed.
USINT -> INT
UINT -> DINT
UDINT -> REAL

Hopefully commented well enough to follow.

AOI for Ladder Logic Toggle

posted Jul 1, 2015, 1:54 PM by Darren Ash


The tag value "T1.Q" will flip flop each time "InputLogic" goes high. Use the Bool "T1.Q" or the inverse, "T1.QNot" in other XIC instructions in logic.  This is setup to reset state on a power cycle.  Would be easy to modify to maintain state through a power cycle if needed.

UDTs for use with 1771 & 1794 I/O BTR/BTW Instructions for use with 1756-DHRIO module in RIO mode

posted Jul 1, 2015, 1:47 PM by Darren Ash   [ updated Jul 1, 2015, 1:55 PM ]

See attached files.  If the above does not make sense, you probably don't need it.  Some items below use bit field mapping to make it more intuitive for use.  The ones that don't can be converted to that method.

Miscellaneous Add On Instructions for ControlLogix

posted Nov 14, 2013, 12:23 PM by Darren Ash

  • AOI_FindTool - This allows you to locate the edge of a part relative to a tool spindle.  Initially tested with Kinetix 350 using CIP Motion, PAC used was a 1769-L27ERM.  Similar to the Rockwell Home to Torque AOI.  Created in V21

  • AOI_ReadBytes - Used to read from an iCode interface unit at the tag byte level.  Initially setup and tested with  56RF-IN-IPD22A. Created in V20

  • AOI_WriteBytes - Used to write to an iCode interface unit at the tag byte level.  Initially setup and tested with  56RF-IN-IPD22A. Created in V20

Add-On Instruction

posted Jul 2, 2011, 9:46 AM by Darren Ash   [ updated Jul 2, 2011, 7:14 PM ]

Have posted a more advanced version, EST.zip, that utilizes the same Control structure that you use with a FIFO Load / Unload pair.  This will allow you to delete an element in the middle of an array, but keep the Control.POS value set to the correct location.  This one I titled EST for Extract Stack.  Latter I will add a LST for Load Stack so that an element can be loaded anywhere in the array structure.

=================================================================
This Add-On was created in V19.  It will allow you to select an element within an array, that element will be copied to a destination and then the elements below it will be moved up to fill in.  The last element in the array will then be written to 0.  The add-on is attached below as ArrayShift.zip.



The main logic resembles:

/*If routine has completed previously then exit routine*/

IF DN THEN
TND();
END_IF;

/* Retrieve the size of the incomming array */
SIZE(ArrayIn,0,ArraySize);

/*Validate requested position to remove*/
IF (Position >= 0) AND (Position <= ArraySize-1) AND (ArraySize>1) THEN
ER:=0;
/*Set destination data to extract array element*/
Destination:=ArrayIn[Position];
/*Calculate the array positions to operate on*/
CopyStart:=Position+1;
CopyLength:=ArraySize-(Position+1);
ClearStart:=10;
/*Validate there is something to copy*/
IF CopyLength >0 THEN
CPS(ArrayIn[CopyStart], ArrayIn[Position], CopyLength);
ArrayIn[ArraySize-1]:=0;
ELSIF CopyLength = 0 THEN
ArrayIn[ArraySize-1]:=0;
END_IF;

DN:=1;

ELSE
ER:=1;
END_IF;

1-5 of 5