Simulate digital input



I am currently working on a project, and i have access to limited hardware.

I have got Pac sim and Pac disply working togehter. But i would like to simulate digital input buttons. Does anyone know how i can simulate a digital input signal in pac display?

When i choose “Send discrete” there are only shown digital outputs in the list.

Thank you for your help!

PAC I/O Rack Simulation. How?

Hello karstensson,

Welcome to the OptoForums! There are a few different ways to approach this, depending on what your big-picture goal might be.

In [B]this post[/B] I wrote about an application where someone wanted to be able to switch between using real hardware and using simulated values. I explained how to use PAC Control’s “Simulation” category of commands in a little logic in a chart.

But that might be more complicated than you need.

In our [U][B]PAC Project Demo package[/B][/U] (is that what you started with?) the logic for the bottling plant just points to variables (floats, ints) instead of I/O points. You’d just need to change your PAC Display project to point to the real hardware instead of the “fake” variables if/when you switch.

From within PAC Control’s debugger you can change the IVAL of your non-existent digital input as shown here:

Our nifty [I]groov [/I]product ([U][B]free trial click here[/B][/U]) provides some other interesting options too–does your project require PAC Display, or could [I]groov [/I]work instead or in combination?

Can you tell us a bit more about what you’re up to there?




Hello OptoMary,

Thank you very much for your help.

I guess what i will try to go with the simpler method:)

I am student an student at major univeristy in Sweden. I am a part of a larger project (in cooperation with an swedish ariplane manufacurer) where we are supposed to design an automation cell for prepreg cutting. Me and my friend are responsible for the electronics and security part.

However, we have decided to go with hardware from opto22, but the only hardware we have access to at the moment is a couple of snap pac learning centers. Therefore we need to completely simulate our working process, since the cost of buying everything would be very high.

We have not looked in to groove that much, we were only educated in Pac display and Pac control(basic version), therefore we are using those. Since we need a lot more I/O’s than the learningcenter have we think we need to use pac sim. But do you think we should use groove instead?

Thank you!


You can use [I]groov [/I]as your UI (user interface) either instead of or in addition to PAC Display, depending on what features you need.

Your control logic (the strategy) will run either there on your real hardware (the SNAP-PAC-R1 in the Learning Center) or on PAC Sim/SoftPAC on your PC.

Since you asked, I tried connecting a [I]groov [/I]Button to a digital input and it worked! You’d need to select the button first from the gadget palette, and you’ll see that the Digital Inputs are grayed out (normally people don’t want to toggle INPUTs). Once you’ve connected them, you can change your fake/disconnected I/O points (their IVALs) just like I mentioned in the “DEAD EASY” PAC Control debugger option above.

Neat-o! I’m glad you asked!



Update: not sure if you guys decided to try [I]groov[/I], but I’ve recently learned that this back-door method for tying a button (or other gadget type) to a digital input (or other grayed-out tag types) is considered a bug/loophole that could go away at any time.

Hopefully an officially supported way to write to IVALs, etc., will be added before this “undocumented feature” is removed, but there’s no guarantee.

In any case, I hope your project is going well!