Is it possible that writing too many tag values at one time could also corrupt this?
I am loading tag values with one button click:
[code]if valid:
# Selects the machineNumber, and writes the values to the corresponding tag
value = event.source.parent.getComponent('mb_select').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/mb_select' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('drum_spd_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Drum_SPD' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('trav_fast_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('trav_slow_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('trav_slow_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow_SP' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('trav_slow_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow_2_SP' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Total_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/TTMW' %(machineNumber)
system.tag.writeToTag(tagPath, value)
# Slow pass count goes to PassCountSlow.PRE, and Body 1 Slow Cycle -- (Multibody Functionality)
value = event.source.parent.getComponent('slow_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Pass_Count_Slow' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('slow_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_1_Slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
# Fast Pass count goes to PassCountFast.PRE, and Body 1 Fast Cycle -- (Multibody Functionality)
value = event.source.parent.getComponent('fast_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Pass_Count_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('fast_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_1_Fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('slow_cyc_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('fast_cyc_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('slow_cyc_val 2').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('fast_cyc_val 2').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('slow_cyc_val 3').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('fast_cyc_val 3').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body1_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body2_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body3_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body4_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.parent.getComponent('PCODE_Display').getComponent('Label').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/STRING' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body1_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/b_weight1' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Body2_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Begin_Weight 1').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Beginning_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('End_Weight 1').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Ending_Fast_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Color_ID').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/CLR_Select' %(machineNumber)
system.tag.writeToTag(tagPath, value)
value = event.source.parent.getComponent('Color_Percent_Value').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Color_Percent' %(machineNumber)
system.tag.writeToTag(tagPath, value)
fpmi.gui.messageBox("Data Loaded To Controller")[/code]
When I click on the load button, I get:
Once I get the write timed out error, I can no longer write tag values to the controller until the gateway is restarted. When the gateway is simply restarted, however, it still will not work, and the errors mentioned in the beginning of this post start. The only way to get it running again is to stop the gateway, delete the data cache, and then restart.
Also, when this occurs, the gateway takes quite some time to actually stop, and generates the following message:
My guess is that too many values are trying to be written at one time, causing corruption of the data cache... ?
To test this theory, I split up the tag load by placing the following in two places:
import time
time.sleep(1)
I thought that by doing this, it would allow a group of tags to be written before sending the next batch.
This does work, and all the tag values are being written. Unfortunately, this has caused a new problem. Now when I click the load button to write the tag values, I get to error messages, but they do not contain any information. Basically, just blank error messages. I would assume that I am way off base by using the time.sleep and that is the reason why these error messages appear.
If you can shed any light on this, it would be greatly appreciated.
Added:
I see that there is an output to the console associated with this blank error message:
[quote]ERROR [ClientTagUtilities$WriteListener-AWT-EventQueue-0]
[/quote]