PLUS+1 User Forum

PLUS+1 Software => Displays => Topic started by: BRIan on November 14, 2011, 12:59:19 AM

Title: PIN Generator
Post by: BRIan on November 14, 2011, 12:59:19 AM
I want to use a random generated reference number to generate a PIN code for use on the DP600. eg the display gives a random number to the customer who then uses an excel sheet to produce his unique PIN code which he enters to gain access to secure parts of the program.
So, I need a random number generator that only uses 1-8 and a PIN algoritm that again only uses 1-8 and can be used in GUIDE and excel and give the same result.
Any ideas?
Title: Re: PIN Generator
Post by: Jakob on November 14, 2011, 08:37:41 AM
I did make an application that does what you described but it used the sevicetool to enter the code.
One way to generate a "random" number could be, using the
OS.LoopCnt hardware signal with a scalefunction and a sinusfunction block,
this way you can get a number between what ever you want.
Title: Re: PIN Generator
Post by: turboshad on November 18, 2011, 11:13:02 PM
Why limit yourself from 1-8, though I'm assuming it's so you can use the soft buttons. I use the exec. time to seed a pin and then use the up down arrows to select the number and the left right arrows to select the digit. For an algorithm I simply square the seed, take the last two digits off and using the now last four digits as the pin. ex. seed=1234, 1234^2=1522756, pin=5227. It kind of depends on you customer as to how complicated the algorithm is but my my purposes this simple one is enough.