SnapRoll 2: How the ANS accomplishes this in real-time,no-sweat...

discflicker
By discflicker
Feb 21, 2013 · 5 min read
Math and Buzzard:

I really appreciate you taking the time!!!


I worked a Ford for a long time as production engineer writing data collection software. My pride + joy system is called ANS (Alarm Notification System)


ANS is a pure client/server architecture… nothing happens until live events (clients) interface with the server in the form of unsolicited message requests. ANS accepts unsolicited ALARM requests (for example, a drill bit breaks on a milling machine located in a certain area of a certain building in a TOOLING plant).

The ANS database can be configured to accept alarms and dispatch messages over a variety of “OUTPUT DEVICES”. The database uses two tables to accomplish this:

Alarm

(pk) System_ID: TOOLING
(pk) Alarm_ID: 1
Alarm_Description: Broken Drill Bit
Stale_Tumeout: 900 seconds


The TOOLING system sends a set of parameters along with the message:

P1: 34mm diamond bit
P2: The machine row#
P3: The machine column#
P4: The machine building#


Here is an example of the unsolicited alarm request from the TOOLING system:

ALARM
/System_ID: TOOLING
/Alarm_ID = 1
/Alarm_Sub_ID = “|ROW_55|COL_23|BLDG_22|34mm Diamnond bit|”






When a tool like this breaks, it can shut down production. Typically, the repairmen are alerted and they immediately fix it.

The ANS allows the plant to separate these shop floor events from the list of people who get notified. That’s one of its greatest strengths; Ford has thousands of pagers, for example… the ANS lets dozens of systems like TOOLING to all share these targets without needing to re-program every individual one of them as personnel and shift hours change.

This flexibility is accomplish by using the Alarm-Event table:


Alarm-Event

(pk, fk1)System_ID: TOOLING
(pk, fk1)Alarm_ID: 1
(pk, fk2)Target-Device: 1 Joe-Pager, 2 Joe-email, 3 Marquee_33, 4 Frank-CellPhone, 5 Marquee_33, 6 PlantManager-EmergencyPager
Escallation_Delay: 1: 0,2: 0, 3: 0, 4: 120 seconds, 5: 120 seconds, 6: 240 seconds




The table contains re-formatting codes to make up custom messages for each target:

1: Joe-Pager:
“JOE ! Fix the @1 in Building @4 location: C:@1, R:@2”

2: Joe-Pager:
“For your records, this message was sent to your pager : JOE ! Fix the @1 in Building @4 location: C:@1, R:@2”

3: Marquee_33:
“WARNING: Broken tooling device in building @4 may cause reduced availability… repairs have been requested”

4: Frank-CellPhone:
FRANK !! Broken tooling device in building @4, JOE was notified, but no response after 120 seconds. Please investigate for @1 in Building @4 location: C:@1, R:@2”

5: Marquee_33:
“WARNING: Broken tooling device in building @4 WILL cause reduced availability… repairs have been requested, BUT NO ACTION TAKEN after 120 seconds…”

6: PlantManager-EmergencyPager
“Time for some whoop-ass… punish the innocent in Building @ and always protect the guilty in the ivory tower. Have a nice day.”


When the first responder (Joes) gets the call, he can send another unsolicited client transaction request into the ANS called a CANCEL ALARM request:

CANCEL_ALARM
/System_ID: TOOLING
/Alarm_ID = 1
/Alarm_Sub_ID = “|ROW_55|COL_23|BLDG_22|”



Wildcards:

The ANS system is big on the use of WILDCARDS. If Joe is the only repairman, he could just cancel ALL of the TOOLING-1 alarms, plant-wide as such:

CANCEL_ALARM
/System_ID: TOOLING
/Alarm_ID = 1
/Alarm_Sub_ID = *

The * means ANY alarm-sub-id that matches. Now, WATCH THIS!!


CANCEL_ALARM
/System_ID: TOOLING
/Alarm_ID = 1
/Alarm_Sub_ID = |*|COL_23| BLDG_22|

Cancel all alarms in Building BLDG_22 located in COL_23


CANCEL_ALARM
/System_ID: TOOLING
/Alarm_ID = 1
/Alarm_Sub_ID = |*|*|*_2*|


If Joe fails to send the CANCEL_ALARM request within 120 seconds, his manager Frank will be informed, and after 240 seconds, the Plant Manager will have a few choice words for Frank, who will be kind enough to pass it onto poor Joe.



Queuing mechanism, speed, and DEPENDABILITY


Within the ANS a live list of all of these in-process alarms is maintained in a lightning-fast queuing mechanism, all performed in-memory. It can easily handle 100 alarms per second input and 200 alarm-events per seconds dispatch all on boxes made way back in the 20th century.

This system is the only custom production system left at Ford… it remains as the “glue” which all of the vendor-purchased systems ALL use for alarming and for real-time-feedback control. It’s still in place after 20 years.



Configuring SNAP in the ANS:


I was able to configure the ANS with System_id: SNAP, Alarm-ID 1 and 2, as described above and got all of this testing done in 16 hours, including the analysis and write-ups.


ANS can easily handle the inflow of alarms from rollers and make the data available as follows:


1. The input of rolls and their transient 6-second life was described above.

I can provide you guys with a “Roller Client” if you like and you can send in anonymous rolls from anywhere in the world, and it WILL WORK… it does work!!!

2. The only question that remains are HOW DOES THE SYSTEM GET “RANDOMIZED NUMBERS” FROM IT?




Obtaining randomized numbers from SnapRoll:



If you guys run the RollStation program, you will see that the system is really looking for RANDOMIZATION RANGES:

For example, its looking for a “1 to 38 range” for playing American Roulette, a “1 to 37 range" for European Roulette, a “1 to 36 range” for 2-dice games, etc…


I will establish the following alarms for the “RANDOMIZATION SUPPLIERS” to use when sending an unsolicited, live event into the SnapRoll Server:

10 1-die
20 2-dice, indistinguishable
21 2-dice, distinguishable
30 3 dice, indistinguishable (same as a 1 to 36 Wheel spin)
31 3-dice, distinguishable
33 3-dice, Sic-Bo style (one off-color, two indistinguishable)
40 1 to 37 Wheel spin
41 1 to 38 Wheel spin
60 1 to 50 Keno
60 1 to 55 Mega-Lotto
100 1-digit decimal input
101 2-digit decimal input
102 3-digit decimal input
(etc)

*The system is capable of accepting any kind of randomization ranges in addition to those shown.


The SnapRoll works by making SUBSCRIPTIONS to the ANS, and the information returned will be appropriate for what it’s looking for:

· The RollStation already shows how this mapping occurs for any of the games listed.

· If we now want to get a 10-digit randomization off of these inputs, it can be done in any number of ways, for example, scaling the input number into the desired range, bit-shiofting, combining bytes into words, etc




Next up:


I will work on updating the RollStation program to point to a SnapRoll server anywhere on the network to obtain these live randomizations from.

I have already informed my patent attorney of this new invention.

I estimate about 2 – 3 man-months to get a working prototype done to where I‘ll be able to demo it for him using live video feeds, right in his office.



I APPRECIATE YOUR TIME AND YOUR COMMENTS!

All posts in discflicker's blog · All member blogs