SIMPL Module Best Practices

When I started programming Crestron systems, there were two other programmers on my team. One was a senior programmer who had been doing it for years already; the other was a junior programmer who had been doing it for a year maybe? I feel like I fit into the middle slot between them quite nicely. So, I tried to follow the senior guy’s example and help the junior guy out when I felt that I could.

The workflow I picked up from the senior programmer was:

  • Copy-and-paste the previous program you worked on and only change the bits needed for the new system. 90% of the code is probably going to be the same anyway.
  • Don’t jam ANY signals together, always buffer them or use an OR.
  • Never hide program logic inside of a module.

I can already tell this is going to be a divisive post because of how different people treat user modules. I want to present 3 modules in this post, talking about why they were written, how they evolved, and why they were the best approach.

Continue reading “SIMPL Module Best Practices”

SIMPL Best Practices

I recently received an email asking if I could document some of the things I wished I had known when I started Crestron programming. I didn’t touch Crestron until the twilight years of the 2-series (2010), but it was thankfully a solid platform to learn SIMPL Windows on. I had several years of AMX under my belt, so at least SIMPL+ wasn’t strange to me.

I’d like to write a few posts that explore how I approach programming now that I have a little hindsight. I’ll also reveal areas where I still struggle to find the best methods.

Crestron has a SIMPL Windows Best Practices guide that is useful. The release notes also contain some good rules to follow. I’ll try not to repeat what’s already stated there.

Let’s dig in!

Continue reading “SIMPL Best Practices”

Writing “Correct” Programs

Lately, it feels like I’ve had a problem making sure my programs are “correct.” I’m hoping if I write about it, I’ll see a pattern that I can fix. It’s frustrating for everyone when bugs slip into commissioned systems, and it reflects badly on custom programming as a whole when these errors aren’t caught before the space is in use. After all, we don’t want to be the cause of the house burning down.

Continue reading “Writing “Correct” Programs”

Programming on the Road

I’ve been traveling for work recently and kicking myself for not bringing an RMC3 along. It’s not that I enjoy Crestron programming every waking minute of the day. A lot of times, I try to test programming out before I ship it off to someone as a “fix.” As control system programmers, we’re in a different boat from others where we can’t run our programs on our laptops to test. Specifically, if we’re writing SIMPL code, we have to have physical hardware accessible to us. It would be great to have a SIMPL Simulator for testing logic, but that’s not something Crestron provides and no way am I going to try reverse-engineering their LPZ file format (that’s specifically against the dealer agreement).

So what options do we have for a programmer on the road?

Continue reading “Programming on the Road”

ATEM Mini Pro

Blackmagic Design makes some cool production switchers that are reasonably priced and work great. They even distribute an SDK to control them from Windows or Mac programs. Controlling from Crestron is tougher, but not impossible. Some third-party products have sprung up to make it easier, too. In this post, I’m going to walk through how I wrote a module to perform a couple of functions on the ATEM Mini Pro.

Continue reading “ATEM Mini Pro”

VirtualBox Headless

Collected from the wonderful documentation at https://www.virtualbox.org/manual/ch07.html.

To see which VMs are available, type:

$ VBoxManage list vms
"dev-site" {2e39d6cc-c307-44f6-b73e-a6f95e0f17b0}

To only see running VMs, type:

$ VBoxManage list runningvms

And to start it:

$ VBoxManage startvm "dev-site" --type headless
Waiting for VM "dev-site" to power on...
VM "dev-site" has been successfully started.

HTML5 Cleanup

The last post took me way too long to write (like an entire month), and I think it’s the format of trying to step through every single change, every single time that’s slowing me down. We’re going to be moving into program sizes where that just isn’t going to work. But before we make that jump, I want to do some clean-up on our last program, the Huddle Room.

Continue reading “HTML5 Cleanup”

SIMPL Tricks: 4-series

If you’re starting to get into 4-series projects but you don’t have actual hardware to test with you can load SIMPL programs targeted for 4-series processors to a 3-series. I’d heard the reverse was true: a 3-series programs should run unmodified on a 4-series. But it looks like for testing purposes, you can also run 4-series SIMPL programs on a 3-series.

Of course, your program would need to be written such that it runs on a 3-series and a 4-series. This is different from the 2-series to 3-series transition where the architectures must have been wildly different.