PLCSteam

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About PLCSteam

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. NJ State Machine

    Old thread but here's some samples I've come up with. http://forums.mrplc.com/index.php?/topic/32627-out-of-curiosity-is-there-a-way-to-make-ladder-execute-in-steps-linearly/#comment-153237
  2. Actually that was one of the drivers of this approach. Especially for complex automation controls. This project  has three 6-axis robots, 3 Cognex camera systems, a lathe (rotation & translation), 2 index tables,  4 indexer peripheral stations, and five additional independent motion axes. This system forms, handles, inserts, and swages a rivet that has a shank diameter of 0.008", so the product itself is very difficult to see. The status of each state machine is part of the HMI display so the current state of each sub-system is displayed for the tech. The encapsulation of code in this manner effectively eliminates 99% of the code. The deterministic nature of state machines allow only one state to exist for a particular state machine at any given time. For example if tech walks up an Robot 1 has stopped at the Rivet forming table, the tech would see that the current state of Robot 1 (SM_100) is equal to 147. By going to section s_145, which houses states 145 thru 149, of  POU 'pg_sm_100_Robot_1 (SM_100) The tech will find the following The the rung controlled by state 147 has one contact needed to complete the transition condition to execute the robot pick program (PRO12). In this example this contact is SMc[430], so the robot is waiting for SM_400 to reach state 430. Using the same method the tech traces why SM_400 is stuck at 425. I use ladder for the majority of the code sequencing and ST (Inline) for math and text manipulation. The techs I work with love it. The bigger challenge is the training to use SYSMAC Studio. Another nice feature of the NJ is the ability to protect program code as read only. Invaluable in FDA regulated industries. There are also a variety of benefits for implementing manufacturing intelligence and machine performance monitoring.  
  3. I would recommend contacting OMRON help desk directly for support. They are a great bunch of guys and unlike some manufacturers DO NOT require a service contract to ask them questions. That being said, I think what you may be looking for is a selection in the Global Variable table to Publish a variable which makes it available via interfaces such as Ethernet/IP. I use this for robot, HMI, and vision systems. By default Global variables are set to Do Not Publish.
  4. I use a custom state machine function that is essentially a comparison function with some additional functionality allowing the stepping control of code rungs. This method utilizes a register for each sub system in the machine design. Below is a snapshot of the SM_100 (Int Tag) state machine which  can hold an integer value between 100 and 199. This encapsulates the code so that only the rung of code which matches the current state value can execute. The first rung will execute only when SM_100 = 145. Once the transition conditions are true the state of the control register will increment the state register (SM_100) to the next state. Interaction between unique state machines is seen in the last rung where state machine SM_400 must be equal to 430 before the rung will execute the "R4_Pick_150" function block. Through this approach the amount of time along with time stamps for all of the state machines in the project are recorded with each state change.Very useful for isolating code execution delays.  This particular project has 17 different sub systems each with an unique state machine range.