Omron NX Safety Controller: Creating a Simple Program for an E-Stop with a Reset Switch

Hi this is Ray Marquiss, senior application engineer at Valin Corporation. This video is going to show how to create a simple program for E-Stop with a reset switch, and it's based off some previous videos that do the setup of the Omron NX safety controller and an NX1P PLC. If you've been following the other videos, you've got a project already with a safety controller in it, and you've created some variables and you'll be able to check those by looking in the IO map. We've named the physical inputs and outputs. I'm going to go to the program section and on the right hand side in the toolbox. There are some safety function blocks, which seems like that would be the first place to go, but I know that my E stop is going to have a reset and I want to set it up so that the reset has to be pushed for a certain amount of time before it actually resets the system.

I don't want someone accidentally bumped and reset the system. So I'm going to grab that. FT on which is a time delay and then I want to name this function block. So I'll just give it a name. You can name it whatever you want, as long as it's not a reserved word. And then I'm going to add onto the input. Here I'm going to use the reset switch, so I just start typing RE. It'll bring up the Intellisense or a list of the variables have already created and you can see that research their sets, which there and I can just. Selective with my mouse and then here I'm going to use a fixed time goatee and then number sign 1S. Now instead of hitting enter here because if I do I'm going to select something from the list. I just want to click with my mouse anywhere and then it just uses that constant value. Now the next thing is to click, right click on the line that comes out of the Q output. An you can go down the list and select insert assignment. And that makes a space for me to type in another variable, which is going to be one that I'm going to make up. Just right now on the fly I'm just going to make an internal variables reset, delay done, and in because of the way I have my settings on this. Sysmac studio it asked me whether I want to make it a global or local variable. In your case, it may just be that it automatically makes it one or the other. I can't remember which. So the next thing I need to do is insert a rung below where we are currently, so I'll right click in the left column there and then select insert run below. Now I'm going to add my E stop function blocks.

So I'm just going to drag that over to where it says start here just like we did above. And then I want to name that, so I'll give that function block a name. This first input is the activate and I'm just going to make that a constant. True so that this function block is operational. The next input is this SE stop in when you see the S in front, that means it's a safety and put in and needs to use an actual safety physical safety input. In the IO table for the safety controller we can see what we've named those, but you can also just type and click in that little box and start typing what you think your your name was in the list will come up of variables that you've already created, and you can just select one by clicking on it and hitting enter, or double clicking on it with your mouse. Next is the S start reset, which is the. How you want this function block to behave when when the PLC starts running the program and I'm going to make that true. That means that it's going to reset that. As soon as you power up, if all the input conditions are satisfied, the next one is the S Auto Reset and that I'm going to set defaults. That means that the function block won't auto reset when all the input conditions are are satisfied correctly. What I want to do is manually reset, so I'm going to make the auto reset false. And then I'm going to click in here and I'm going to put in that reset delay done from above. Where we have it coming out as a result of that timer. So essentially when the reset switch is pushed after a second, the reset delay done will come on in. That will reset the function block if you're not quite sure what these are. If you forget you can click on the function block and then hit F1 and it will bring up. The help file that shows the listing of what the input and output variables are for.

Next I'm going to do the same thing we did above, and on that SE op output I'm going to right click and say insert assignment. And this is where I'm going to put my safety relay. Which was like safety relay out, but I'll just start. I can go back to the IO list and look and see what the name is. If I want or the IO map to see what the name is. Or I can start typing what I think it was and scroll through the list and it here it is there. It's the safety relay out so I'll select that. Next, we want to run this program in the simulator. But before we can do that, we have to build it. So we go to the project menu and then build controller. An it'll take a second and down near the right hand side you'll see a bar progress, but you want to make sure that there's zero errors and zero warnings when you're done. And then once you're done with that build, you can go into the simulation menu and say run or click on the run. After you click on run, some windows will open asking questions about how you want to proceed. And basically you say OK or click on OK for all of them. Or yes, and then when you get to this password one, if you haven't entered the password, don't ignore password here and it's advisable not to enter a password until you're ready to deploy the machine anyway. Once it's in the simulation mode, you can see that the status of your inputs and Outputs is displayed, whether true or false, and then there are numeric values there as well. You can see on this one that the eastop input is false, and so the safety output is false.

We can try to set that by right clicking on the variable and then selecting to set it, but still that relay output is off, so we're going to go and set the reset switch and then after a second the reset delay done comes on, which resets the eastop function block. Making the safe safety relay output on so. Now if I reset the eastop input you can see that the safety relay output went off. So you can go through your program and test your inputs and Outputs in your program operation this way. That's it for the simulation and the first program creation. In a future video I'll be showing you how to use the debug mode to test the program on the actual safety PLC. Thanks for watching. If you have questions. Take a note of the phone number on the screen.

If you have any questions or are just looking for some help, we're happy to discuss your application with you.  Reach out to us at (855) 737-4716 or fill out our online form.