PAC Sim and Alarms


I am running PAC Control Basic and PAC Display Basic version 9.3 and I am using the PAC Sim controller. I am having problems with PAC Sim. When I go on runtime mode, there is an error saying that there is a communication failure which makes sense because I am not connected with any brain therefore there is no I/O. So my question is how would I go about fixing the connections without the brain. Do I have to individually go through each Input and set the values or is there an easier way ? I have read and somewhat understood what the Simulation Commands is trying to say on FORM 1701 so is there any examples of this online or on youtube?

My another question is regarding the alarms. I am trying to make a chart which would check if my PC has crashed. That chart interacts with the Alarm Points in the PAC Display via the tag : PC_Crash_Status. Now the operator does not in anyway interact with the PC_Crash_Status variable because that’s between the PAC Control and PAC Display, so there is not a button he can click to send a value letting the strategy know that it’s time to move on. The only time the Operator sees the PC crash is when the PC actually crashed and he cannot physically do anything with the PC. Now I have read the Alarm section in the PAC Display user guide ( very well written I might add! ) but my question here would be am I going about this the wrong way with the alarms ? If so, do you think there is a better alternative. My thought process of choosing this was to make the operator interact with the Display ( during Runtime ) as little as possible this is why I chose the alarms.

Thank you, I really hope I can get great feedback on both these problems.


Hello innotech01,

This Simulation Commands example might help.

However, I’m hoping you’ll share a few more details about your setup. In the first paragraph, I think you’re only talking about PAC Control, and when you said “runtime mode” you meant “debug mode”?

Also still on that first paragraph, there are a couple of concepts that are important here. You can “disable” an I/O Unit, so that your controller (PAC Sim in this cause) won’t communicate with it. In Config mode, in your strategy tree, double-click on an I/O unit. About 2/3rd of the way down, there’s a checkbox (which is checked by default).

If you un-check that, you can still modify the IVALs of your I/O either using the debugger or with the simulations commands you mentioned. (IVALs are the “internal” values of your points, etc. vs the XVAL or “external” values coming in from actual readings.)

In your second paragraph, do you have PAC Sim and PAC Display on 2 different PCs? Or maybe you have a hardware PAC checking up on the PC? Could you give me a 10,000 foot view of what you’re trying to do there? If it is a SNAP-PAC-R or –S you’re using to make user the PC is still there, you could try this chart which does a PING (although, depending on what you mean by “PC has crashed” you might get a PING reply from that PC even though the software you care about has crashed).

Anyway, if you could give a bigger-picture view of what you’re trying to solve here, that would help with the brainstorming effort!


Hi OptoMary.

I will look into the Simulation Command example that you provided. Thank you very much for that. When I meant run time mode, I meant on the PAC Display. After making my corresponding HMI screen, I would go on File -> Save Project and Load Runtime. When I run it using the PAC Sim, I will get communication failure. I am using the ip address : because my PAC Sim is running on the same PC as my PAC Pro+PAC Display.

For the second paragraph, I’ll explain what I am trying to do is more detail. First I will answer your questions then go about giving a bigger picture. I am using PAC Sim and PAC Display on the same computer ( actually the same computer as I was using regarding the previous issue ). I am using the PAC Sim so no SNAP-PAC-R or SNAP-PAC-S. Could you tell me more about the PING Concept ? Or provide a Form # where I can read/learn more about it ?

Now here’s the big picture. I am using PAC Sim to simulate a PC crash, yes, but on the actually laptop that is connected to the brain, I will be using SNAP-PAC-R1. By simulating, I mean I am making the strategy and Display and running it over and over to see if there is any communication between the PAC Control and PAC Display since the user doesn’t do anything on his own (such as send a value, send discrete by pressing a button). So here again, I am using as my loopback IP address because the PAC Sim and PAC Control+PAC Display are running on the same computer. I am using the PAC Sim because I want to make the PAC Control+PAC Display as perfect as possible because I don’t want a PC Crash on the real controller/brain and if there is one I want the there is be a there to be a message send to the operator saying that the PC has indeed crashed and I want the brain to stop working. This problem has indeed happened to us a couple years ago. Our PC crashed, operator could not do anything with his computer, but the brain kept function as if the communication line was still alive, when it clearly isn’t seeing how the PC has crashed. Thankfully the supervisor knew how to shut the system off manually so the damage was minimal but what I am concerned about is what if the supervisor isn’t there and the operator isn’t there. There could be some really big problems really fast.

I hope that helps, and like I said, I will disable the I/O Unit and see what happens.

Hi innotech01,

Check out the doc for the pac demo;

We have a bunch of people pull that demo down, and run pac sim and pac display on the same PC all the time.
The doc should get you up and running.

Correct me if I am wrong, but you don’t just want to detect a crashed PC, but a crashed application. In this case, your application is PAC Sim?
Since PAC Sim is running your strategy, and its the one talking to your EB and controlling your process, that’s the app that really matters?

Two thoughts.
Firstly, set up the watch dog function on the EB (Its in the I/O unit configuration dialog box, right near the bottom). This way, if you lose communications, you can set your digital and analog outputs to take on a given state when communications fail between the PC and the EB (for example, if the PC hangs, pac sim hangs, or if an Ethernet cable breaks, or if a switch or router fails) for the given amount of time.
If nothing else, you could configure one of your spare digital outputs with the watchdog and put a noisy alarm with a flashing light. If that comes on, you know something is wrong.

Second thought.
Configure an event reaction on the EB that gets constantly reset by a chart in pac sim.
If something goes bad, the event reaction will fire and sound the alarm.

You never mention using an Ethernet Brain (EB), so I am just guessing, but even if you are using a controller, you can still set up the watchdog, you just wont need the event reaction because you have a controller. In this case, the pac sim strategy resets a counter on the controller. On the strategy on the controller, it tests if the counter gets up to say, three, then sound an alarm.

Hope this helps.



Good Morning OptoMary and Ben,

I just wanted to let both of you know that PAC Sim works ! I was getting the -10038 error and after running the PAC Sim simultaneously, the error went away.

OptoMary, Your input on the IVALS and the example that you provided were both extremely helpful so thank you very much for that. I’ll now work on simulating the PC crash or an application crash. Do you have any Form’s where I can read about the Ethernet Brain? I’m currently reading FORM 1690. Are there any other relevant forms ?

Hey innotech01,

I would be looking at Opto22 - 1704 PAC Manager User's Guide as well.
That’s the PAC Managers Users Guide, doc #1704.


Alright Thanks Ben !

I came across a thought on how to do this. This way is similar to watchdog. Here we go, please let me know if this train of thought is correct.

I will make a recipe file with just 1 entry(initialized to 0). I will check the value of this said variable from the Pac Control and see if it has changed ( 0 -> 1 ). If there is a value chain, then there live connection, and I will change the value back to 0, but if the value remains at 0, then the connection has been lost and i will automatically shut everything down.

I understand that there could be false positives here as in the PC is working fine, and there is nothing wrong with the brain but it still doesn’t respond to the control ( doesn’t change the value from 0 to 1 ) and this will cause the system to shutdown in the middle of a run. Is there any way to solve this ? I.E. if the software shuts down, the brain will shutdown also ?

Please let me know your thoughts.