LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

curve fitting equation Hobby application

Thanks Ben,

I changed things a bit. I made it read the six centerline points out of a csv file and calculate both centerlines. Then I did a best fit sphere to give me the radius and centerpoint of the arcs. I'm using this with a model RR cad program. It can only represent the turnouts as two fixed radius curves. Then I write the centerlines out to a csv file and import them into the CAD program. Kind of crazy, but I'm building a library of the turnouts for the CAD programmer.

Message 11 of 15
(1,045 Views)
Is there a method in labview to convert the spline into the lines and arcs that make the shape??
0 Kudos
Message 12 of 15
(1,034 Views)
Unfortunately, a spline is a spline.  Converting splines to lines and circular arcs is high-level CAD functionality and always involves approximation.  You are probably better off fitting your raw data to lines and arcs, as you are currently doing.  It's too bad the CAD program doesn't accept splines.  They are common on layouts that include easements.  Of course, said layouts are almost always hand laid, since most commercial turnouts do not give you the few degrees of pointing needed to create an easement, so I guess there is no real need.

P.S.  It's good to see more people using LabVIEW for model railroading.  I once implemented a DCC controller using cRIO.  It was the world's least functional and most expensive DCC controller, but it sure was fun to do.
Message 13 of 15
(1,022 Views)
The spline conversion even works for straight turnouts. Here is a screenshot showing the labview spline points imported into the model RR cad program. I got the turnout drawing by converting a pdf file into a dxf file.
Message 14 of 15
(1,006 Views)

Nice work uncle!

 

DF wrote

"

P.S.  It's good to see more people using LabVIEW for model railroading.  I once implemented a DCC controller using cRIO.  It was the world's least functional and most expensive DCC controller, but it sure was fun to do.

"

 

I have recently acquired a loaner of a cRIO that I was thinking about uisng to simulate the motion of the engine sound.

The idea was to use a standard locomotive sound track and mudulate the amplitude and phase to drive a couple of speakers under the layout (via discrete amplifiers).

I already know the position of the engine on my layout via sensors so I can then coordidinate my way-points with physical location and modulate the speaker drives accordingly.

I may not get to this soon because I have been tied up putting together a LabVIEW app for full scale rail wheel inspection. Its funny becuase the line between work and hobby gets rather fuzzy until I look at the scale. In N-Scale my weel sets are about the same size as the flaws I am looking for in the inspectiion. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 15
(976 Views)