FSC using Softlogix

Doug_P

Member
Join Date
Jun 2003
Posts
121
I set up a structure (TOTE) with two elements: ID of type long; DSTN of type integer. I need to search for the ID. RSLogix will allow the entry of the parameters but when the rung is submitted for conversion, the '#' is gone from the structure part. That is, I enter:

#TOTE12:0.ID = TOTE15:0.ID
^- file designator

which then gets converted to:

TOTE12:0.ID = TOTE15:0.ID
^- file designator removed

I can find nothing in HELP which addresses this. Should I not be able to perform file operations on structures? Has anybody else tried this?
 
I did something similar a few years back. In my case, I was searching for a match with a string from a bar code. FSC wasn't an option in that case and I used a for/next loop and indirect addressing on the UDT element to do ascii compares.
The For/Next loops execute very quickly in SoftLogix5 (unlike the hardware version).
 
Hi Doug,
Just from looking at your post I have come to the conclusion that the file indicator in this case is lost. The reason for this as I see it is that you have declared the destination to be TOTE15:0.ID and have made it equal to #TOTE12:0.ID. So my next question to you is.. do you think the system can determine which variable of #TOTE12:0.ID file is = to TOTE15:0.ID?

Just an old mans thoughts aloud,

Bitmore
 
Last edited:
Bitmore said:
...do you think the system can determine which variable of #TOTE12:0.ID file is = to TOTE15:0.ID?
Hello, Bit

It works with other file types:

+--FSC------------------------------------+
| File SRCH/CMP |
| CNTRL R6:0 |
| Len = 10 |
| Pos = 0 |
| Mode = ALL |
| Expression #TOTE12:0.ID = TOTE15:0.ID |
+-----------------------------------------+


Just substitute something like this: Exp #N10:0 N9:1. It's supposed to: start at POS, test ALL of the specified elements in the file #TOTE12:0.ID one by one against the argument TOTE15:0.ID on each invocation. For some reason, the compiler strips off the '#' character so I can't do a true file operation.

I have contrived a search routine to do what I want using the 'bits and pieces' approach, it'd just be so much easier if the built in FSC worked.

I'm probably just missing something simple.
 

Similar Topics

I received the following message via PM, and am posting here publicly to help others. ============================================ I had a...
Replies
10
Views
1,012
Good morning everyone, I'm working on a project where I am recording data from a machine by sending it message packets. Most of the time the data...
Replies
6
Views
2,144
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,145
Good afternoon. I have seen many ways to monitor and reset alarm conditions but most seem to use a lot of logic that I think can be simplified...
Replies
5
Views
4,356
I am trying to search an array using an FSC. I need to check for two varible within the array to make it work. Right now this is the only way I...
Replies
0
Views
1,184
Back
Top Bottom