So that an end user can turn off one of the shifts from a spreadheet (changing the input from a "1" to a "0"), I have set up logic so that if there is a "0" in the box for the crew for the shift in question, the number of resources called for is increased from 1 to 2. There is only 1 resource available so the machine cannot work. This seems to work fine except for the fact that the sometimes the machine breaks down during the "off shift" eventhough the machine is not operating. I have set up breakdowns (MTBF and repair time) on my machines based on calendar time. Changing the breakdowns to "only while running" will not work as many of the downtimes are events that occur during set up or that delay setup. Having breakdowns occur when the machine is sitting idle results in overall low downtimes.
I thought of perhaps using the calendar to shut off the machines, but I would need to be able to do this using VL and I cannot find any references on how to do this. Any thoughts on how to handle this would be greatly appreciated.