Hi all,
I've got a variant of the PCSD EM faceplate for a different library based on earlier PCSD v12. The 'Release' button script sometimes fails to write OWNER_ID, result in a situation where both OWNER_ID and PREV_OWNER have a value of 'Operator'. This renders the buttons useless and requires intervention. But the script is very similar to the PCSD stock script for the same function, so I can't seem to figure it out. In essence, it reads OWNER_ID and PREV_OWNER, then if OWNER_ID = "Operator", switch the values. Code below:
let sPreOwner = await DLSYS.CondReadAsync(Dsp.Tag+'/PREV_OWNER.CV',undefined);let sCurOwner = await DLSYS.CondReadAsync(Dsp.Tag+'/OWNER_ID.CV',undefined);let sQueue = await DLSYS.CondReadAsync(Dsp.Tag+'/ARB_MOD.CV',undefined);
let sPreOwner = await DLSYS.CondReadAsync(Dsp.Tag+'/PREV_OWNER.CV',undefined);
let sCurOwner = await DLSYS.CondReadAsync(Dsp.Tag+'/OWNER_ID.CV',undefined);
let sQueue = await DLSYS.CondReadAsync(Dsp.Tag+'/ARB_MOD.CV',undefined);
if (sPreOwner != undefined && sCurOwner != undefined && sQueue !== undefined){ if (sCurOwner == "Operator" && sQueue == ""){ await DLSYS.WriteAsync(Dsp.Tag+'/OWNER_ID.CV', sPreOwner); await DLSYS.WriteAsync(Dsp.Tag+'/PREV_OWNER.CV', sCurOwner); } else{ await DLSYS.WriteAsync(sQueue +'/'+ Dsp.Tag+'/PRIO_REQ.CV', 5); await DLSYS.WriteAsync(sQueue +'/'+ Dsp.Tag+'/RELEASE.CV', "(None)"); }}
if (sPreOwner != undefined && sCurOwner != undefined && sQueue !== undefined){
if (sCurOwner == "Operator" && sQueue == ""){
await DLSYS.WriteAsync(Dsp.Tag+'/OWNER_ID.CV', sPreOwner);
await DLSYS.WriteAsync(Dsp.Tag+'/PREV_OWNER.CV', sCurOwner);
}
else{
await DLSYS.WriteAsync(sQueue +'/'+ Dsp.Tag+'/PRIO_REQ.CV', 5);
await DLSYS.WriteAsync(sQueue +'/'+ Dsp.Tag+'/RELEASE.CV', "(None)");
This problem only happens the first time the faceplate is opened during a DVLive session, and seems the problem is always failure of the line where sPreOwner is being written to OWNER_ID. What am I missing?
In reply to Matt Stoner:
In reply to Phil L:
I've been battering my head against the wall for a couple weeks now, and still no luck. My system has both the PCSD-variant I asked about earlier, as well as stock PCSD. Here's the 'stock' PCSD script:
let bOvrEnab = await DLSYS.CondReadAsync(Dsp.Tag+'/OVR_ENAB.CV',undefined); let sPrevOwner = await DLSYS.CondReadAsync(Dsp.Tag+'/PREV_OWNER.CV',undefined); let sQueue = await DLSYS.CondReadAsync(Dsp.Tag+'/QUEUE/RELEASE.CV',undefined); if (bOvrEnab != undefined && sPrevOwner != undefined){ if (bOvrEnab && sPrevOwner !== ""){ await DLSYS.WriteAsync(Dsp.Tag+'/OWNER_ID.CV', sPrevOwner); await DLSYS.WriteAsync(Dsp.Tag+'/PREV_OWNER.CV', '(None)'); } else{ if(sQueue != undefined) { await DLSYS.WriteAsync(Dsp.Tag+'/QUEUE/RELEASE.CV', '(None)'); } await DLSYS.WriteAsync(Dsp.Tag+'/OWNER_ID.CV', '(None)'); }
This script also malfunctions the very first time it's executed after opening the FP. The result here is that both OWNER_ID and PREV_OWNER result in values of '(None)', which causes an inescapable hold loop. The equipment this code runs on has a drastically lower rate of holds, so this bug appears to have been undetected for 2 years.
Reproducibility:
1) Set OVR_ENAB = 1, OWNER_ID = "TEST_STRING"
2) Open Faceplate, hit 'Acquire' button [OWNER_ID = Operator, PREV_OWNER = TEST_STRING]
3) Hit 'Release' button [script waits extra time, OWNER_ID = (None), PREV_OWNER = (None)