![]() |
Forum Index : Microcontroller and PC projects : Random trig stuff
Author | Message | ||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
Something the Cap'n mentioned in another thread reminded me to post this stuff. It might be of use, who knows. It's the code from a 5-axis articulated-arm measuring machine. I'm no-longer in that business so might as well post the code. I haven't bothered going through the zip-file so there's prolly a bunch of junk in there as well. TMCBAS.ZIP |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
The file is password protected. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
Weird...it opens every time for me, both the original and the one that I just downloaded from here ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4032 |
I can list the files but each looks to be password protected. John |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2579 |
In W10 File Explorer and 7Zip the file list can be viewed but all the individual files are locked. |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
2nd attempt Measuring center source.zip |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5023 |
Hi Phenix, Sounds like real professional stuff, when it includes a MIDI music player.... Volhout PicomiteVGA PETSCII ROBOTS |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4032 |
Some (including .BAS files) have a lot of non-ASCII chars. Not MMBasic I gather. John |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
Tokenised. QB (and lots of other Basics) had the facility to save either a straight ASCII or the tokenised source. Some defaulted to tokenized - the CPC had a ,A option in the save command to over-ride it. |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
That was for speech prompts; the probe was a non-contact-laser and having to keep looking up at a screen was inconvenient. "Professional": Based on recent reports, I figured that now was not a good time to mention that they were used by Boeing for quality control ![]() ![]() ![]() |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
@Volhout Since the PicoMite now has the ability to read high-resolution incremental encoders, maybe someone might want to create something similar ![]() |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
Hi John, It was MS PDS 7 (fancy QuickBASIC). I open with Notepad++ and all looks good. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4032 |
No worries so long as not corrupted files. John |
||||
DaveJacko Regular Member ![]() Joined: 25/07/2019 Location: United KingdomPosts: 83 |
would be interesting to see the device in action.. here's a simple 3-axis thing that I did with the micromite, just O-level trigonometry, a very short video, I can post code if anyone wants. https://www.youtube.com/watch?v=s34UqWbSSDA regs, Dave Try swapping 2 and 3 over |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
The last one was delivered to Fiat Ferroviaria in 1993 ![]() I wish that I had even still-pics because it was a gorgeous piece of engineering. I don't know if you have been following but @Volhout has provided the capability for the Pico to read high-speed/resolution incremental encoders, huge potential, here. Do you fancy working on something like this? The thing used to sell for US$80K which is just not possible today. |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
What would be really cool, would be to port Steve Annin's AR4 to the PicoMite. He's done some amazing work but still uses steppers (albeit closed loop). A real robot requires that its joints are compliant...impossible with steppers but not with true servos which are able to torque-limit. Would do wonders for MMBasic exposure ![]() |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 54 |
Hi Dave, you wrote I watched the video and became curious. I'm curious about the code you've written. Do you have the opportunity to share it? /Peter63 |
||||
DaveJacko Regular Member ![]() Joined: 25/07/2019 Location: United KingdomPosts: 83 |
Hi Peter Here is a snippet of my micromite code. it's not good but I hope it helps. I haven't included my Visual Basic 6 code, even I cannot understand it ![]() hope this gives you an idea of how it works. As for Phenix's 5-axis stuff, truly impressive. (My project was inspired by a TV program on the manufacture of the BMW Mini featuring James May. The device used is known as a 'Faro Arm') 'a code snippet for Peter63 'project demo at https://www.youtube.com/watch?v=s34UqWbSSDA 'first, set up appropriate pins as analog SetPin 2,ain 'wrist potentiometer SetPin 3,ain 'elbow pot SetPin 4,ain 'shoulder pot Do 'read the 3 pots and adjust to get angles in degrees wa=Int((2.57-Pin(2))*180/2.15) 'wrist angle ea=Int((1.91-Pin(3))*90/1.14) 'elbow angle sa=Int((Pin(4)-1.26)*90/1.2) 'shoulder angle ' print angles in degrees for debug print wa,ea,sa 'convert angles to radians rdn=57.3 wa=wa/rdn:ea=ea/rdn:sa=sa/rdn 'do the maths.. results in cm '11 cm is the length of this Humerus bone '12 cm is the Radius bone 'rd is the effective horizontal length of the arm rd=11*Sin(ea)+12*Sin(ea+wa)+1 'radius in x-y plane 'so this is where the end of the arm is.. ' zp,xp,yp are the Cartesian co-ordinates zp=11*Cos(ea)+12*Cos(ea+wa) xp=rd*Sin(sa)+8 yp=16-rd*Cos(a) 'for debug.. print xp,yp,zp pause 1000 loop Try swapping 2 and 3 over |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 54 |
Hi Dave Thank you for the code, I will take a look. I have used measuring arms a bit in my job. Nowadays I mostly work with troubleshooting on CNC machines. /Peter63 |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1331 |
![]() |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |