top of page

Pro-tip: Scripting

Pro-tips exist to help you stand out from the competition. These are not quite cheating, but I aim to make them as close as possible.


Scripting is fabulous. The IT guys and gals have made our lives much easier if you just try to learn a few tips and tricks from them.


Let's start by setting up backup files in a Windows environment. If I have a development computer, I want to be able to automatically back up my work at the end of the day. Obviously, you should save files, but adding a date and revision is great. However, if you have your whole set backed up to your team's storage automatically when you are done, life is way better. Write this into a batch file using XCOPY! You can have periodic batch files copying your historian data as well.


Let's move on to Powershell scripts. These are like batch files on steroids, but a little harder for me to read. Consider how they can change user accounts. If you have an employee leaving, you can have a script ready to delete their account out at the end of their work. If anyone gains that former employee's credentials, you do not need to worry!


Finally, Python can be wonderful. If you go the hardcore Linux approach, you deal with a bunch of packets. Get started for free! I recommend using Windows if you are just getting started. Download Anaconda, open up a Juypter Notepad and try Automate the Boring Stuff with Python! You can really make one-off magic happen.


Perfect example: I was given 13 years of data for every 5 seconds of a few different variables. Apparently the "data guy" did not have SQL, or just wanted to bother my colleague, so my colleague got the data as a CSV. I spent a few hours looking at Pandas and NumPy, then got hourly average data. The "data guy" was floored and my colleague was able to save his employer six figures.


I have yet to save my employer six figures, but I was able to save huge amounts of time on my part. I have about a dozen batch and Powershell scripts in my flash drive at any given time. (Do not get my started on how much error checking you can do with Python.)

4 views0 comments

Recent Posts

See All

Comments


bottom of page