Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How do you use programming in your work? 1

Status
Not open for further replies.

Christian_S

Mechanical
Oct 31, 2022
23
0
0
NO
Hey

I recently posted this in the structural forum, but seeing as my education is in mechanical engineering I’m curious about the answers from this forum as well.

How do you use programming in your daily work, or what types of challenges do you solve with programming? And what type of language(s) do you use for this?
 
Replies continue below

Recommended for you

PLCs are good for fixture actuator control. Microcontrollers are even more fun. I'm comfortable with Microchip's controllers. Knowing about 35 commands allows you to do quite a bit for controlling fixtures, measuring transducer outputs, use timers, etc.
 
Depends on the project at hand. I use various G-code/graphical "languages" to program everything from Labview to CNC machines. VB is good for excel and MATLAB. Any apps I'm developing ground-up are C++ or Java, and the last few years I've gotten into using Swift quite a bit too.

I'm a traditional automotive design engineer - design, prototype, test, production QA/QC. My work ranges from creating FEA & CFD simulations of purely mechanical systems to quality engineering, and I'm often drug into supporting the EE/mechatronics crowd as well.
 
Christian_S,

As someone in the structural forum pointed out, if you need to share your calculations, the reliable application is Excel. You can name cells in Excel, making your code readable.

I use Octave otherwise. I have even learned to use Octave to generate LaTeX code, which I integrate with my LaTeX documents. LaTeX is another application that you cannot share with co-workers.

--
JHG
 
You can also use Calcpad. It is free and open source:

It natively supports units of measurement in formulas.
Also, it documents your calculations automatically to Html, Pdf and Word with variable substitution.
It is easy to learn and use. Just type your formulas and 'text content' in quotes.

Plate_cfzlui.png


Deep_beam_eaitku.png
 
As the presentation of analysis calculations are usually required to be in a report format, my preference is the use of software such as Mathcad. From an open source perspective, that would include SMath and I believe Maxima (has different GUI software available, but haven’t used it). Sounds like Calcpad would also be a good one to try. Mathcad does have some programming capabilities, which has proven to be useful in many ways.
 
I'm a consulting engineer not involved in R&D or anything like that. We don't use any programming outside of simple formula calcs in Excel. Everything else like flow modeling, pipe stress analysis, etc is done by 3rd party software.

I think some of the structural guys have a VBA calc for steel and whatnot but that's about it.
 
If you can call it 'programming' to do very basic SQL queries (I mean very basic) I use it frequently to bypass the actual front end GUIs of different software to get the data I care about that is replicated and stored in databases. You can save many many minutes this way. Examples: historic temperature probe data throughout the building/equipment; calibration history of gages; in-process dimensional data; equipment work order and maintenance history. All of these would have a different piece of software or web interface to fudge with, and each of them are unconscionably slow to respond. If there was data replication of our controlled document system that was accessible (not necessarily content, but change history) I'd barely use that either!

The only bit of "actual programming" I used recently I had ChatGPT help me with VBA to split an extremely long narrow CSV output (that is how the mechanical test software exports) into numerous excel sheets (one for each test run)
 
Interesting to hear all the different uses. I was hoping to hear more uses for Python as that’s what I prefer, but as many have pointed out that can’t really be shared easily.
 
Christian_S,

I have not yet played with Python. Is it a good language for calculations?

Analysis is a specialized application. You want to use languages optimized for this. In MatLab, Octave and in any spreadsheet, I can (fairly) easily generate graphs. Python is more for apps and machine controls is it not?

--
JHG
 
drawoh

I think there are probably better languages for calculations. For mechanical engineers I think Python is good for simulations and machine learning if you’re into that.
I just find that I don’t need to spent any thoughts on the code itself as when writing Python.

 
Seeing as we're all entering our answers on computer software that were programmed, this question requires a bit of nuance. Are you talking PLCs? Calculation software? Software to automate internal processes? Excel macros? Does MathCAD count as programming?

I haven't written much software code in the last 20 years, but when I was younger I wrote in Fortran, C, C++, BASIC, and touches of Java. Last time I programmed was several years ago when I wrote an extension for Creo using J-Link programming tool. I find it takes me days/weeks to get productive in a programming environment, and certain programming platforms (anyone remember Visual C++?) have a brutally difficult learning curve that limits their value to full-time programmers. There is certainly value in writing your own software solutions when the technical knowledge is deep enough and the programming platform is approachable enough for a casual programmer. Now that my corporate computer is fully locked down and it takes multiple IT requests to get any new feature approved, installed, and functional, I don't see myself attempting innovative solutions anymore.
 
I did programming decades ago, as a student, and also in my final year project at uni (Medusa programming script for UI and modelling selection). I’ve not had the need for programming in the industry I’m in, more down to the fact that calculations need to be in report format and only authorised programs can be used, usually in-house generated.
 
Status
Not open for further replies.
Back
Top