Posts Tagged release

SoapBox Snap version 2015.11.01 has just been released, with a bug fix (dragging and dropping an instruction to the left of itself could cause an editor crash) and a new feature: the ability to export a lookup table of signals and addresses to a CSV file (for the Arduino Runtime).

If you’re using the Arduino Runtime for SoapBox Snap and you want to hook it up to something over the serial port, you’ll need to be able to read and write signal values. Due to space limitations in the Arduino, storing the lookup table between signal name and address is just too costly, so there was no easy way to figure out which address your coil signal was in. This release adds an Export Signal Table feature to solve this problem.

Go to Tools -> Options… and find the SoapBox Snap Arduino Runtime options page. Check the box called Export Signal Table, and enter a (fully qualified) directory where you want the table exported to. Now every time you do a download of your program to the Arduino, Snap will create a CSV file listing the address, signal type, signal name, and the comment. Now you can lookup which address corresponds to which signal name.

Have you ever wanted to control your lights and appliances from a .NET application? We’ve just released a new .NET library called FluentDwelling that makes it really easy to write a .NET application that interfaces with Insteon and X10 devices using a SmartHome 2413U:

We’ve just put a new version of SoapBox Snap up for download (version 2011.03.01). This version adds a new I/O driver for DirectX compatible game controllers.

If you have an old joystick, racing wheel, or game pad for your PC lying around, you can now use it to drive discrete and analog inputs in your SoapBox Snap ladder logic program. SoapBox Snap will automatically detect your game controllers the same way it auto-detects Phidgets devices:

Connect to the runtime

Under the runtime node, right click on Device Configuration

Click the Read Configuration option

That forces you to disconnect from the runtime after reading the configuration. You can just re-connect and choose to download your application if you want to try it out right away. You will be able to see the discrete inputs light up when you press the buttons on your controller. To see the analog inputs (axes) working, you’ll need to use those somewhere in your logic.

I’ve just pushed the latest version of SoapBox Core (2010.11.29) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has a handful of new features. You can read the details at ask.soapboxcore.com.

Version 2010.11.15 of SoapBox Snap is now available for download. It includes 11 new Math and Comparison operators for the ladder logic module. This fills in most of the missing functionality you need to make good use of the NUMBER type in your applications.

Let’s step back and talk about types for a minute. SoapBox Snap only has 3 types:

BOOLEAN

NUMBER

STRING

That’s a really lean type system compared to most PLCs (but of course, “Snap is not a PLC”). If you’ve done much traditional PLC programming, you would expect to see a dozen different numeric types, like BYTE, INT, UINT, DINT, UDINT, not to mention SINGLE, and DOUBLE precision floating point numbers, and various BCD numbers if you’re really lucky. At first when I was writing SoapBox Snap, I planned to support every data type in the IEC-61131-3 standard, but I realized all those types only existed because traditional PLCs are so memory constrained that you had to take memory usage and low level memory management into account when you use them. One of the goals of SoapBox Snap is to remove the burden of memory management from the programmer. That’s why there’s only one NUMBER type and it can represent any number.

SoapBox Snap already used the NUMBER type in the Counter and Timer instructions that shipped with the first version. The counters expose a Count output that you can access just like any other signal. Likewise, the timers expose an Elapsed output (in milliseconds). Of course, all analog inputs in your Device Configuration also expose NUMBER type signals, and all analog outputs consume NUMBER type signals, so now you can manipulate all of these signals with the new instructions below.

Math

The new math instructions carry out your four basic mathematical operations: add, subtract, multiply, and divide. Each takes two NUMBER inputs, and produces a single NUMBER output. Since a result is generated, all of these instructions are considered “right hand” instructions (that is, they show up on the right hand side of the rung). They all use the rung-in condition to enable the operation. If the rung condition feeding the instruction is false, the result stays the same as it was during the previous scan. If the rung condition is true, the result is overwritten with the new result of applying the operation to the two inputs.

There is one exception: if the second input to the divide instruction is zero, it disables the instruction from executing, so the result will stay the same as the last scan. There are various alternative ways it could handle a divide-by-zero condition (throwing an error, setting the result to zero or infinity, etc.), but I thought that holding the last “good” value was the most reasonable thing to do.

Comparison

These are your basic comparison operators. They are all “left hand” instructions, so they go on the left side of the rung, where you normally use contacts. Each one takes two NUMBER inputs, just like a Math instruction, but doesn’t generate an output, other than the rung-out condition. If the rung-in condition is false, the rung-out condition will always be false. If the rung-in condition is true, the instruction will read both inputs, apply the comparison, and set the rung-out condition to the result of the comparison. Therefore you can chain these comparison operators together on the same rung (for instance to say A > 250 and A < 750).

Choose Number

Similar to the Math instructions (in that it has two NUMBER inputs and one NUMBER result) is the new Choose Number instruction. This instruction copies the first input to the result if the rung-in condition is true, and otherwise it copies the second input to the result. If you use this instruction in combination with a Greater Than instruction, then you can easily implement a Maximum instruction. That is, if A > B, return A, else return B.

What’s Next?

There are some small features we’re going to be adding to SoapBox Core shortly. After that we’ll come back to adding some new features to SoapBox Snap, so keep watching this space for updates. Remember, contact us if you have any questions, or post a question on the support site. Most of you like to email me directly, which is just fine. 🙂

I’ve just pushed the latest version of SoapBox Core (2010.09.11) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has a handful of new features. You can read the details at ask.soapboxcore.com.

I’ve just pushed the latest version of SoapBox Core (2010.06.13) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has some new features and now targets .NET 4 and Visual Studio 2010. You can read the details atask.soapboxcore.com.

I’ve just pushed the latest version of SoapBox Core (2010.05.24) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has some new features and improvements to existing functionality:

Added ReverseBooleanToVisibilityConverter to the SoapBox.Utilities assembly (so you can make something visible when a property is false).

Added a ProgressBar control to the Status Bar controls! (I admit that should have been there from the start.) When you inherit from AbstractStatusBarProgressBar, remember to set the Minimum, Maximum, and Value properties appropriately. You’ll probably want to play with the Width property too.

Documents and Pads now keep the tab text in sync with the Title/Name property of the IPad or IDocument ViewModel.

Buttons, buttons, buttons: If you want to create a row of buttons, for instance, across the bottom of your View, then create a property on your ViewModel called Buttons that returns an IEnumerable<IButton>. Then populate that collection with objects that inherit from AbstractButton. Put an ItemsControl in your View that binds its ItemsSource property to the Buttons property, and voila… MVVM buttons anywhere.

To support this new button functionality, IButton (and AbstractButton) now includes IsCancel and IsDefault properties, along with Margin and Padding properties so you can get them to look the way you want.

I’ve just pushed the latest version of SoapBox Core (2010.03.17) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has some new features and improvements to existing functionality:

Moved NotifyPropertyChangedHelper into a new Assembly: SoapBox.Utilities

Added SoapBox.Core.Messaging (an implementation of the new IMessagingService interface)

Added SoapBox.Core.FileDialog (an implementation of the new IFileDialogService interface) which provides ViewModels for Open and Save dialog boxes

Uses IPartImportsSatisfiedNotification instead of ImportingConstructor, which is a better way to use MEF

IDocument and AbstractDocument are now document factories. For instance, you can define a text editor document, and it can create new instances of itself every time the user opens a document. The default implementation is to return itself, but that can be overridden. (Thanks to ipeksinan over at the CodeProject Article about SoapBox Core for pointing out the deficiency.)

Significant changes to LayoutManager (and ILayoutManager):

LayoutManager now doesn’t save to its own files or auto-restore when you launch, it just gives you a blob on SaveLayout which you can pass back to RestoreLayout. This works much better as you can save the layout in your own user file, and restore it when they open that file, project or solution. Note that the blob is standard base64 encoded, plus a couple of period characters (.) so it’s easy to stuff into other containers, like XML documents.

Added HidePad(…)

Added HideAllPads()

Added CloseDocument(…)

Added CloseAllDocuments()

IMenuItem/AbstractMenuItem now supports context menus. I’ll have to post some code on the documentation wiki to explain how it works.

Added a ShutdownCommands extension point to SoapBox.Core.Host

Added an Extensions namespace to SoapBox.Core. This is where all the individual extensions within SoapBox Core are defined (like the default menu items, etc.) so they’re now strongly typed instead of being hard coded strings. So if you wanted to insert a menu item before File, you could reference it as SoapBox.Core.Extensions.Workbench.MainMenu.File and use that in your InsertRelativeToID property. I suggest setting up an Extensions namespace the same way in your own application.