Author Topic: PIN Generator  (Read 10581 times)

Offline BRIan

  • PLUS+1 Expert
  • ****
  • Posts: 60
  • Karma: +3/-0
PIN Generator
« 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?

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: PIN Generator
« Reply #1 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.

Offline turboshad

  • PLUS+1 Developer
  • ***
  • Posts: 14
  • Karma: +3/-0
Re: PIN Generator
« Reply #2 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.