Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:27 02 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Random trig stuff

Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1331
Posted: 12:49pm 20 May 2024
Copy link to clipboard 
Print this post

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: Australia
Posts: 1982
Posted: 08:42pm 20 May 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1331
Posted: 09:30pm 20 May 2024
Copy link to clipboard 
Print this post

  palcal said  The file is password protected.


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 Kingdom
Posts: 4032
Posted: 10:04pm 20 May 2024
Copy link to clipboard 
Print this post

I can list the files but each looks to be password protected.

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2579
Posted: 10:07pm 20 May 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1331
Posted: 05:46am 21 May 2024
Copy link to clipboard 
Print this post

2nd attempt


Measuring center source.zip
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5023
Posted: 06:35am 21 May 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4032
Posted: 07:19am 21 May 2024
Copy link to clipboard 
Print this post

Some (including .BAS files) have a lot of non-ASCII chars.

Not MMBasic I gather.

John
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 07:46am 21 May 2024
Copy link to clipboard 
Print this post

  JohnS said  Some (including .BAS files) have a lot of non-ASCII chars.


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 Kingdom
Posts: 1331
Posted: 08:26am 21 May 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Phenix,

Sounds like real professional stuff, when it includes a MIDI music player....

Volhout


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 Kingdom
Posts: 1331
Posted: 08:29am 21 May 2024
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 1331
Posted: 08:31am 21 May 2024
Copy link to clipboard 
Print this post

  JohnS said  Some (including .BAS files) have a lot of non-ASCII chars.

Not MMBasic I gather.

John


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 Kingdom
Posts: 4032
Posted: 12:13pm 21 May 2024
Copy link to clipboard 
Print this post

No worries so long as not corrupted files.

John
 
DaveJacko
Regular Member

Joined: 25/07/2019
Location: United Kingdom
Posts: 83
Posted: 09:32pm 21 May 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1331
Posted: 11:11pm 21 May 2024
Copy link to clipboard 
Print this post

  DaveJacko said  would be interesting to see the device in action..


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 Kingdom
Posts: 1331
Posted: 11:45pm 21 May 2024
Copy link to clipboard 
Print this post

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: Sweden
Posts: 54
Posted: 03:59am 22 Jun 2025
Copy link to clipboard 
Print this post

Hi Dave, you wrote

  Quote  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.


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 Kingdom
Posts: 83
Posted: 09:27pm 22 Jun 2025
Copy link to clipboard 
Print this post

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: Sweden
Posts: 54
Posted: 02:23am 23 Jun 2025
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1331
Posted: 06:05am 23 Jun 2025
Copy link to clipboard 
Print this post

  DaveJacko said  

The device used is known as a 'Faro Arm')



Faro was a competitor. They threatened to sue me over my laser-probe. Theirs was IR at the time but you couldn't see what the heck you were doing. I used visible laser. They really didn't have a case but I was all too familiar with the litigation nonsense in the US. It's all about who has the deepest pockets so I backed out.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025