Logix 5000 FSC Instruction

bbishop108

Member
Join Date
Mar 2017
Location
Indiana
Posts
86
I have been using the FSC instruction in a couple of application successfully. I am now trying to use it in a new application, and I feel that I am missing something.


The basic concept is that I am searching thru a DINT Array of tags and comparing it against a blank DINT Array looking for the first instance where both arrays have a value of zero. This portion of the FSC is working correctly as it stops at the first instance and I see on the FSC Instruction what position it stopped at when the search was equal.


Now here is where I am looking for some help with the FSC Instruction. So with my DINT[32], after execution of the FSC the Position listed is 4. So I know that in my DINT[32], I will call it Tag[32], and at Position Tag[4] is where my FSC stopped searching. Is there any way to capture the tag associated with the Position.....i.e Tag[4]???


I am not interested in the value at the Position, which in this case would be four. I am more interested in the Tag that corresponds to the Position of the FSC Instruction....which again in this example would be Tag[4]. Thanks
 
I might be missing something as well, but can't you just size the control data object to be the same size as the array you're searching, and then just capture the .POS value of the control object in the FSC?

Edit: never mind, that's exactly what you said you weren't interested in :ROFLMAO:

Would an indirect address do the trick? Tag[Control.POS]?

I guess I'm not 100% clear on your goal here.
 
Last edited:
LoganB, Well after I did some more testing and then I saw your edit to your post, this is pretty much what I may have to do. Using the Tag[Control.POS] will have the location after each execution of the FSC. What I am trying to accomplish is being able to send a robot to this open position after each execution of the FSC instruction, but I'm not sure if I can use the Tag[Control.POS] as a location that the robot can use. Thanks
 
You'll probably have to have a lookup table (array) that has the robot locations pre-programmed in, then use the Tag[Control.POS] as your indexer to know which location to send to the robot.

IF Tag[Control.POS] = 1 THEN MOV RobotPOS[1] to robot
IF Tag[Control.POS] = 2 THEN MOV RobotPOS[2] to robot
IF Tag[Control.POS] = 3 THEN MOV RobotPOS[3] to robot

etc
 
Last edited:
Ok so I'm feeling a bit on the DA side of what I was trying to accomplish! I clearly made this out to be far more difficult than it needed to be that's for sure. As I previously posted that I wanted to get the actual value from Tag[Control.POS], the light bulb finally went off! I was going about this all wrong trying to get the position data from the Tag[Control.POS], this is NOT where the position data is stored!!! The data I was looking for is actually in the Control tag!!! So when I went to my Control tag and expanded it, low and behold was the POS data. The actual value I wanted was in the tag Control.POS.....NOT Tag[Control.POS].


I apologize for any and all confusion with what I wanted, as this greatly frustrated me to no end! I was even told that it was in the control tag, but it wasn't clicking that it was the tag for the Control of the FSC Instruction. I named the tag for my control.....Control. Thanks for everyone's input on this issue!!!
 

Similar Topics

Hi there. In RSLogix 5000 i have an array of barcodes, and used an FSC bit to find which array position an input barcode matches. However when the...
Replies
9
Views
2,751
Hello, Please Help! I have an array of 20 registers that I want to search for a value. There will be over 100 DINTS Values that come in and if the...
Replies
7
Views
1,779
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,707
I am using the same logic from Look up a barcode example. Not able to make it work on L69 32E
Replies
2
Views
1,229
I have a boolean array 10 elements long, and would like to be able to trigger an event when any three of these elements equals 1. I have not had...
Replies
4
Views
4,927
Back
Top Bottom