DEV Community

Namhyeon Go
Namhyeon Go

Posted on

How is JavaScript used in industrial equipment?

Singha: "Shut up! How dare you speak nonsense in front of your elder! If you talk nonsense, you’ll get beaten up badly under the bridge!" – An old meme in South Korea.

Grotesque Imagination

Ten years ago, in an office somewhere in South Korea, a group of engineers was deeply troubled. A new development project needed to be launched for around 200 industrial machines, but the timing for updating the programs was extremely limited, meaning there were very few opportunities to distribute the updated software.

However, the required developments involved frequent updates by nature.

The company wanted this issue resolved, and hired experienced developers, whom they considered top-tier by their own standards, to come up with a solution. Yet, developers frequently quit due to the stress, and conflicts within the team arose almost daily.

After much deliberation, they made a decision.

"Let’s apply industrial scripting!"

In this kind of environment, while there aren't many opportunities to update the main program (binary), there are generally no restrictions on scripts that the program can process.

Industrial Scripting

Although JavaScript (and TypeScript) is mainly used in web front-end development, a part of the JavaScript ecosystem includes a field known as industrial scripting.

The concept of industrial scripting is not exclusive to JavaScript (there are alternatives like Lua or Perl), but I, in my hipster fashion, decided to go with JavaScript.

NASA's Industrial Scripting Case

NASA’s James Webb Space Telescope

A well-known case proving that JavaScript can be used as industrial scripting is NASA’s James Webb Space Telescope.

The telescope, which was launched in 2021, uses a JavaScript engine (Nombas ScriptEase 5.00e), released in 2002, for flexible control.

If NASA can do it, why can’t we? Let’s go for it!

The control systems of the equipment we wanted to manage were mostly running on Windows. Windows has a built-in scripting engine that's well-integrated with the operating system's features.

With this in mind, we started the project, and finally, the results were beginning to take shape.

Internally codenamed "Macadamia," the project was later released as an open-source project under the name WelsonJS.

Since it's open-source, anyone interested is welcome to contribute.

https://github.com/gnh1201/welsonjs

Top comments (0)