Converting FSC from CompactLogix to Siemens S7-1200

lunenburger

Member
Join Date
Jul 2008
Location
Summerside
Posts
209
I am new to Siemens and we have to convert a CompactLogix program over to a S7-1200 PLC.
We are having a hard time finding a comparable instruction in Siemens to do the same function as the FSC in Studio 5000.
(See attached pic of logic) We are doing a recipe lookup from a hand scanner and loading the recipe.

Anyone know of a function in Siemens that would do the same thing?

thanks in advance

FSC.jpg
 
it's probably going to be a non-MAIN block like this (I am using generic syntax; Siemens-ifying it will be up to you):


Code:
########################################################################
### Assume recipe name not found

----------[MOV        ]----
          [Source  100]
          [Dest    pos]


########################################################################
### Check recipe 0 name

---[EQU                        ]---[MOV        ]---
   [SourceA       ScannedRecipe]   [Source    0]
   [SourceB  RecipeList[0].Name]   [Dest    pos]


########################################################################
### Check recipe 1 name

---[EQU                        ]---[MOV        ]---
   [SourceA       ScannedRecipe]   [Source    1]
   [SourceB  RecipeList[1].Name]   [Dest    pos]


########################################################################
### Looping might be another option, if you prefer, especially if
### RecipeList length is variable

...
  

########################################################################
### Check recipe 99 name

---[EQU                         ]---[MOV        ]---
   [SourceA        ScannedRecipe]   [Source   99]
   [SourceB  RecipeList[99].Name]   [Dest    pos]


########################################################################
### Matching recipe name was not found

                      RecipeNotFound
---[GRT         ]----------(S)-----
   [SourceA  pos]
   [SourceB   99]


########################################################################
### Matching recipe name was found

---[LES         ]----[COP                     ]----
   [SourceA  pos]    [SourceA  RecipeList[pos]]
   [SourceB  100]    [SourceB    CurrentRecipe]
                     [Length                 1]
 
It is quite easy to do recipe handling in S7, I do not have S7, TIA loaded at the moment so could not show you how to do it.
Assumptions:
The recipe scanned in is a string containing x amount of chars for recipe description, The recipes are same length (it does not have to be).
But as a simple concept LD[AR2,P#0.0] is the best guy here to help you.
I would have a data block with a list of recipes, each of these will have a pointer to a corresponding data block for the recipe. Operator scans in a recipe, a loop through the recipe names DB to check for the recipe match, this then copies the DB containing the recipe (by the pointer ) into the working recipe DB
So loop through recipe name DB until a match is found.
load the pointer to the recipe DB, move the block into the current recipe DB
How you put the recipe data into the blocks is up to you.
 
The recipe list is a fixed value now at 100.

Originally the idea was to allow creation of "infinite" number new recipes, but processor memory put a stop to that...
 
"infinite"
That’s funny

I always wonder why the AB programmers use the plc as a recipe handler instead of the hmi
 
I agree PLC's are not good for large or many recipes, I have done a number of recipe handling mainly for batching systems by far SQL is the best, one system had what you may call infinite, each recipe had over 4,000 words (16 bit) split between bits for enables, words for time, reals for recipe values and strings for descriptions. I have also used HMI's for recipe handling makes it far more easy to handle recipes.
 
I am new to Siemens and we have to convert a CompactLogix program over to a S7-1200 PLC.
We are having a hard time finding a comparable instruction in Siemens to do the same function as the FSC in Studio 5000.
(See attached pic of logic) We are doing a recipe lookup from a hand scanner and loading the recipe.

Anyone know of a function in Siemens that would do the same thing?

thanks in advance

I'm willing to guess that the official Siemens answer to something like the FSC instruction is to write some code in SCL (Structured Text) that does what you need; this is what LD showed. The Siemens approach seems mostly to only provide system instructions for things that the user actually can't program themselves, or are basics of the IEC standard.

Something else to note is that there are instructions to write recipes to the PLC memory card as CSV files, instead of trying to keep the data all in memory. The reason this is important is that one of the big differences between AB and Siemens is retentive memory. In AB land, my understanding is that all tags hold values through a power cycle. Siemens PLCs do not work that way, and tags only hold values if they are marked as "retentive" (with retentive memory being limited). Most tags revert to a defined start value when the PLC starts up (power on or stop -> run).

If you have a big memory card (I think Siemens goes up to 32GB, but the card might cost as much as the 1200 CPU at that point), then you do get effectively infinite storage.
 
Last edited:
If using siemens I would definitely look into using their built in recipes handler within the HMI. Rather than using the PLC memory.

However, if your recipes are only a few variables, either ways fine.
 
Ken
It’s been in the comfort panels for awhile
Get away from that PCS7 and come to the dark side. :)

CFC is on its way too
 
I think that some of the comments regarding Siemens are a bit biased.
Siemens had something close to modern PLC languages back in the 80's, in fact I would not be surprised if ST, SCL, FBD structures and most of the other bits & bobs was not based on the S5 system. A lot of complaints or praise about the different PLC IDE's used is based on a number of things, location, User exposure to the platforms, language translation etc. Back in the day I was part of a company that were one of the first to become a Siemens approved system builder, as a company we had a number of PLC manufacturers on board and did not concentrate on any particular platform, in saying that if we had a choice then it would be Siemens based on experience, amount of software & simulation equipment already on-board priority discounts etc. Personally I did prefer Siemens but would work on any platform. The harmonisation of languages tries to remove the differences but I'm sure we all realise that this is not the case at the moment, source code can be re-compiled from platform to platform but due to hardware differences there is at the moment some re-work is needed.
Getting back to the OP's problem, obviously the recipe structure and the way it is handled is based on what functions were available in CLX, you would have the same problem converting the other way round. The OP has not divulged any real information on the recipe structure apart from a look up of recipe name etc. To be honest this could be done on a number of platforms using indirect addressing. Data Blocks in Siemens are by default retentive and depending on available memory could potentially have hundreds.
 

Similar Topics

Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
210
Hello PLCs Forum, I am in a bit of a pickle and was hoping someone could offer me some help. I have a .rss file and just need to see the ladder...
Replies
2
Views
125
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
329
Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
391
Hello, This will be my first time converting powerflex 40's and 400's from devicenet to ethernet. I did some research, and it seems I will need...
Replies
4
Views
760
Back
Top Bottom