FSC Instruction won't enable

Join Date
Jun 2023
Location
Ohio
Posts
13
I have a FSC instruction that won't enable. I check tags and data type and can't find the problem.

I'm trying to pull index numbers for data collection by scanning barcodes(ID) and use it to pull the index(array) to add data during inspection.

URL]7Pz9z


I attached a snippet of the program for clarification.
 
Last edited:
The image needs to be uploaded to the site first. In a post, go to Advanced, use the paperclip to upload it, then you can attach the image after it has been uploaded.
 
When you say "won't enable", do you mean that the instruction Control.EN bit is not true, despite the rung logic up the the FSC being true (and the routine scanned)?

Or do you mean that the instruction is not returning the value that you expect; i.e., looking through your array of DINTs to find the first instance that matches your target DINT, and thus set the Control.FD bit (or the .DN bit if it gets to the end without a match)?

Or do you mean that the rung with the instruction will not compile (assemble edits)?
 
Blow the control bits away before using the FSC each time otherwise it's likely to not work after the first time the instruction is executed.
 
Blow the control bits away before using the FSC each time otherwise it's likely to not work after the first time the instruction is executed.

A RES(Control) is a clean way to do that.

What's that? RES is only for timers and counters? But an RES is also a 3 word object, just like timers and counters, and the .POS is the same as the .ACC, and all the bits (.DN, .TT, .EN or .DN, .FD, .EN) are all cleared by the RES. The .PRE and .LEN words are untouched by the RES instruction.

Works great for FALs and all file instructions, except where you need to merely unlatch the .FD bit so that the instruction will find the next instance.
 

Similar Topics

Maybe this is just not possible, or maybe I am doing something wrong. Background; I have a data array of over 1500 products. For sorting I...
Replies
6
Views
765
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,769
Hello, I'm brand new to the forum and I have a frustrating problem at work that I've been trying to find a solution to. I have scanned the...
Replies
7
Views
11,216
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...
Replies
4
Views
2,563
I've been beating my head :bonkhead: in all day trying to figure out why the FSC instruction isn't working in my Program. I Created a 1500 Recipe...
Replies
13
Views
7,017
Back
Top Bottom