SFC SoMachine CodeSys Question

Clevername

Member
Join Date
Oct 2009
Location
NY
Posts
36
I'm trying to run a transition off a Boolean variable. This variable is two other global variable flags anded together in a separate CFC POU. In the POU that performs the "and" the output displays as true but the transition in the main SFC routine never turns on to proceed to the next step. Also the variable shows as true in the Global variable list.

Should I not be using flag bits as globals or something? Internal Registers?

To get around this before I drove two physical outputs with two flags. Then I "anded" them together internally. Seems a bit odd.

Thanks!
 
That's odd and shouldn't be the case . You can use global or internal vars both for transitioning in SFC .
Please check that the global transition boolean is not being overwritten from some other location.
 
in a trans you are allowed to use AND

(bit1 AND bit2) as transition is normal
and yes you also may use a program line
is your SFC called in a task?
this question is better at www.codesys.com forum
when is your AND called if that is in the SFC it will not work as only the active step is done.

send up the program or part of as an export file.
 
I'll double check my work again, its a bit of a mess right now and I haven't had a chance to work though it lately.

I simply use the SO qualifier on two separate action blocks in two parallel branches to set two different bits. The transition below these action blocks is the AND of the two bits.

I then reset the two bits with RO below the transition. I'll have a look more into it later.

1) I'm using an m258, what are the internal registers I can use. Do people just assign a variable name to a bit and use that or actual memory locations? I guess its the same thing really.

2) The program started off nice and organized but now it's a mess. Like Step 2 transitions into Step 58 and things like that. How do people normally handle this?
 
Try to have the SFC blocks on max 2 pages vertical.
use subroutines or macros.
do not use jumps

1)you are free to use markernumbers (unlike many plc where some markers do have special functions)
2) first prepare a good flow diagram
 
Weird, I ran out of time to get in depth but the Boolean flag output working is related to how high the POU is listed in the Mast. If its on the bottom it doesn't work. I moved it to the top and it works? I did remove a few other POU's as well but that was the last thing I got to.
 
ha so you have something with a global variable and you set it twice in your program.
have a look at references
for your there is in resources a task configuration, that will help you to get your program faster and easier to manage.
 
So, if my "anding" program is above the "SFC" program in the mast it works fine. Nowhere else do I use the anded Boolean output. Weird, I can make it work just don't understand.
 
Can you attach your project file or send snapshot of the code under scrutiny ?

Working on it now. I'm actually in a CoDeSys class now and the instructor was curious as well. So far I've ripped all POU's out of the mast except the POU anding 2 inputs for a flag and the SFC POU.

It works only if the SFC POU is below the anding POU in the mast. All the freewheeling and cyclic options do not matter as well. The variables are not accessed anywhere else in the SFC POU either.

About a year ago I had errors about something about a "HiddenPOU". The Fix according to the Schnieder Rep was just to add and empty POU called "HiddenPOU". This error is still around. Whats the deal with that?
 
"hidden POU"

The "Hidden POU" issue usually occurs when you have created a project with a newer version of the controller in the software compared to your actual hardware OR you are using an older version of SoMachine for newer target version of hardware .

What you can do is select "display all versions" and select the right version of the controller based on your SoMachine software version supported controllers and target version of the controller itself.

Check the attachment.

DisplayVersions.jpg
 
Lets see if this works. I moved it to a CoDeSys win NT controller just for more of an audience. I do have a copy with a m258 but the results are the same. I'm sure I'm doing something stupid but can't see why. Thanks!

If the the Global flags;
LoPro_move_flag1 and Picker_move_flag are set true in the GVL menu. The Lopro_picker_done_flag1 does not go true. This is dependent on the order of the mast programs.


If you have POU "Reset" above "Picker_and_Lopro_flag1" it does not work and vice-versa.


http://dl.dropbox.com/u/51871743/DoNotUse2.projectarchive
 

Similar Topics

I want to initialize SFC with memory bit. my SFC name is a conveyor and the output address is conveyor.sfcint. while building the program, it...
Replies
0
Views
1,253
Running SoMachine v4.3 and writing a small program in SFC. I am stalling on how to comment my logic. I haven't been able to find a way to add...
Replies
1
Views
1,557
Hey. If you haven't already read me, first time I'm building a full project on Rockwell PLC. I started building the sequences last week and I...
Replies
3
Views
127
Hi all. I'm building my first Grafcet using Logix, but I started from another project. From what we usually do with other PLC's, I was expecting...
Replies
3
Views
154
I have a fanuc servo motor and drive that I salvaged from a lathe barfeeder that was headed for the dumps which I'm trying to see if I can get...
Replies
2
Views
154
Back
Top Bottom