I am receiving a gateway error: "Received event for missing view 'Audit1_SP@C"'. The script is taking the drop down box answers and dumping them into a SQL database. The script works in preview mode on the Ignition designer, but I receive the error when I run the script online. I have attached a screen shot of the error below.
Is the named view the one running the script? Is there a close or navigation action also firing? Actions run in parallel, so the timing from a real client could be faster than the designer.
Show your code.
Here is a screen shot of the script & navigation:
There is a navigation to a different URL. The script is pulling from two different views.
Try removing the navigation action and using the equivalent at the end of the script.
I removed the navigation, and I received the same error.
Please show the whole script, pasted as text here, and then formatted with the "pre-formatted text" button (so the indentation and punctuation is preserved).
Time = system.date.now()
MachineNumber = self.session.custom.MachineNumberSP
PPE = self.session.custom.PPESP[0]
StartStopSwitch = self.session.custom.switchSP[0]
Swept = self.session.custom.SweptSP[0]
Trips = self.session.custom.TripsSP[0]
Desk = self.session.custom.DeskSP[0]
PaperWork = self.session.custom.PaperWorkSP[0]
YarnLot = self.session.custom.YarnlotSP[0]
MergeLot = self.session.custom.MergeLotSP[0]
BackingNumber = self.session.custom.BackingNumberSP[0]
PatternVStandard = self.session.custom.PatternVStandardSP[0]
PileHeight = self.session.custom.PileHeightSP[0]
StitchCount = self.session.custom.StitchSP[0]
Sidelight = self.session.custom.SidelightSP[0]
CombLoops = self.session.custom.CombloopsSP[0]
Mendgun = self.session.custom.MendgunSP[0]
Lines = self.session.custom.LinesSP[0]
CrossedEnds = self.session.custom.CrossedEndsSP[0]
BowSkew = self.session.custom.BowSP[0]
StopMark = self.session.custom.StopSP[0]
DropEyes = self.session.custom.DropEyesSP[0]
CenterLine = self.session.custom.CenterlineSP[0]
BackingJack = self.session.custom.BackingJackSP[0]
BladeBlocks = self.session.custom.BladeBlocksSP[0]
#system.db.runPrepUpdate("INSERT INTO Tufting_Audit_Table (MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks) Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",[MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, Bladeblocks])
system.db.runPrepUpdate("INSERT INTO Tufting_Machine_Audit ([Time Submitted], MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks) Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",[Time, MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks])
self.session.custom.MachineNumberSP = ' '
self.session.custom.PPESP = ' '
self.session.custom.switchSP = ' '
self.session.custom.SweptSP = ' '
self.session.custom.TripsSP = ' '
self.session.custom.DeskSP = ' '
self.session.custom.PaperWorkSP = ' '
self.session.custom.YarnlotSP = ' '
self.session.custom.MergeLotSP = ' '
self.session.custom.BackingNumberSP = ' '
self.session.custom.PatternVStandardSP = ' '
self.session.custom.PileHeightSP = ' '
self.session.custom.StitchSP = ' '
self.session.custom.SidelightSP = ' '
self.session.custom.CombloopsSP = ' '
self.session.custom.MendgunSP = ' '
self.session.custom.LinesSP = ' '
self.session.custom.CrossedEndsSP = ' '
self.session.custom.BowSP = ' '
self.session.custom.StopSP = ' '
self.session.custom.DropEyesSP = ' '
self.session.custom.CenterlineSP = ' '
self.session.custom.BackingJackSP = ' '
self.session.custom.BladeBlocksSP = ' '
Hmmm. I'm stumped. Look for other scripts being activated that are causing navigation anyways. Something is making that view cease to exist.
The script that is running is very similar to another script. The scripts are dumping the data into the same SQL table "Tufting_Machine_Audit". The difference between the two views is one is English & the other is Spanish.
Here is the English script:
Time = system.date.now()
MachineNumber = self.session.custom.MachineNumber
PPE = self.session.custom.PPE[0]
StartStopSwitch = self.session.custom.switch[0]
Swept = self.session.custom.Swept[0]
Trips = self.session.custom.Trips[0]
Desk = self.session.custom.Desk[0]
PaperWork = self.session.custom.PaperWork[0]
YarnLot = self.session.custom.Yarnlot[0]
MergeLot = self.session.custom.MergeLot[0]
BackingNumber = self.session.custom.BackingNumber[0]
PatternVStandard = self.session.custom.PatternVStandard[0]
PileHeight = self.session.custom.PileHeight[0]
StitchCount = self.session.custom.Stitch[0]
Sidelight = self.session.custom.Sidelight[0]
CombLoops = self.session.custom.Combloops[0]
Mendgun = self.session.custom.Mendgun[0]
Lines = self.session.custom.Lines[0]
CrossedEnds = self.session.custom.CrossedEnds[0]
BowSkew = self.session.custom.Bow[0]
StopMark = self.session.custom.Stop[0]
DropEyes = self.session.custom.DropEyes[0]
CenterLine = self.session.custom.Centerline[0]
BackingJack = self.session.custom.BackingJack[0]
BladeBlocks = self.session.custom.BladeBlocks[0]
#system.db.runPrepUpdate("INSERT INTO Tufting_Audit_Table (MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks) Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",[MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, Bladeblocks])
system.db.runPrepUpdate("INSERT INTO Tufting_Machine_Audit ([Time Submitted], MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks) Values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",[Time, MachineNumber, PPE, StartStopSwitch, Swept, Trips, Desk, PaperWork, YarnLot, MergeLot, BackingNumber, PatternVStandard, PileHeight, StitchCount, Sidelight, CombLoops, Mendgun, Lines, CrossedEnds, BowSkew, StopMark, DropEyes, CenterLine, BackingJack, BladeBlocks])
self.session.custom.MachineNumber = ' '
self.session.custom.PPE = ' '
self.session.custom.switch = ' '
self.session.custom.Swept = ' '
self.session.custom.Trips = ' '
self.session.custom.Desk = ' '
self.session.custom.PaperWork = ' '
self.session.custom.Yarnlot = ' '
self.session.custom.MergeLot = ' '
self.session.custom.BackingNumber = ' '
self.session.custom.PatternVStandard = ' '
self.session.custom.PileHeight = ' '
self.session.custom.Stitch = ' '
self.session.custom.Sidelight = ' '
self.session.custom.Combloops = ' '
self.session.custom.Mendgun = ' '
self.session.custom.Lines = ' '
self.session.custom.CrossedEnds = ' '
self.session.custom.Bow = ' '
self.session.custom.Stop = ' '
self.session.custom.DropEyes = ' '
self.session.custom.Centerline = ' '
self.session.custom.BackingJack = ' '
self.session.custom.BladeBlocks = ' '