Jump to content

Random number for self-center probing testing


---
 Share

Recommended Posts

I wanted to test self-centering probing with slightly different nominal values on each run, so GPT-4 wrote this code for me:

 

// Generate a pseudo-random number using system time and CMM position
LongStringOfNumbers = millisecondClockValue().asString.hash + getPositionCMM().x.asString.hash + getPositionCMM().y.asString.hash + getPositionCMM().z.asString.hash

// Convert the long string to a number
RandomHighValue = val(LongStringOfNumbers)

// Get a random number between 1 and 100
RandomValueBetween = mod(RandomHighValue, 100) + 1

 

I let it run overnight and it worked perfectly, but I'm not sure if I just got lucky or if it might cause unexpected behavior with CMM in the future.

So I all ears for your opinions.

 

Edited
Link to comment
Share on other sites

sounds like he was testing by moving nominal position to confirm it would always center into relatively the same position every time...

 

aka just keeping an eye on Calypso... making sure it does what its supposed be doing....

Link to comment
Share on other sites

 Share

×
×
  • Create New...