SLAA891B April 2019 – February 2020 MSP430FR2512 , MSP430FR2512 , MSP430FR2522 , MSP430FR2522 , MSP430FR2532 , MSP430FR2532 , MSP430FR2533 , MSP430FR2533 , MSP430FR2632 , MSP430FR2632 , MSP430FR2633 , MSP430FR2633 , MSP430FR2672 , MSP430FR2672 , MSP430FR2673 , MSP430FR2673 , MSP430FR2675 , MSP430FR2675 , MSP430FR2676 , MSP430FR2676
Batch files automate the process of generating one or more DXF output files, one for each sensor element. Using the example wheel.bat batch file, all four elements are rendered and output into separate DXF files. The contents of the wheel.bat file are:
openscad.exe -o wheel_element_0.dxf -D "element=0" wheel.scad
openscad.exe -o wheel_element_1.dxf -D "element=1" wheel.scad
openscad.exe -o wheel_element_2.dxf -D "element=2" wheel.scad
openscad.exe -o wheel_element_3.dxf -D "element=3" wheel.scad
When creating a slider or wheel sensor that has more or fewer than four elements, it is suggested to create a copy of the slider or wheel batch file and modify it to match the number of elements specified in the new script. For example, if you create a 3-element slider, copy slider.bat and give it a new name, such as slider3.bat. Edit this new file so it renders and outputs 3 elements, as shown in this example:
openscad.exe -o slider_element_0.dxf -D "element=0" slider.scad
openscad.exe -o slider_element_1.dxf -D "element=1" slider.scad
openscad.exe -o slider_element_2.dxf -D "element=2" slider.scad
To execute a batch file, open a command window and navigate to the directory where the script files are located. Type the name of the batch file including the .bat filename extension (for example, "slider3.bat").