roggowb
Member
I have been asked to build a device to indicate the order of 4 inputs. These will be a photocell/light arrangement to decide in which order 4 model cars crossed the 'finish line'.
I plan for any of the inputs to start a timer and when the input is triggered to put the time in a memory location. Then to have the PLC decide which order by comparing the times. The first one is easy because the time will be '0'. My problem is the logic to compare the other three inputs and indicate the order in which the inputs are triggered.
In the BASIC language this would be done by sorting an array and assigning '2', '3' & '4' to the corresponding entries. However, most PC's today do not have a parallel port which could be used for input and output.
Does anyone have any ideas how to decide the order in which the inputs were triggered and be able to supply some of the necessary logic?
Thanks
Bill R.
[email protected]
I plan for any of the inputs to start a timer and when the input is triggered to put the time in a memory location. Then to have the PLC decide which order by comparing the times. The first one is easy because the time will be '0'. My problem is the logic to compare the other three inputs and indicate the order in which the inputs are triggered.
In the BASIC language this would be done by sorting an array and assigning '2', '3' & '4' to the corresponding entries. However, most PC's today do not have a parallel port which could be used for input and output.
Does anyone have any ideas how to decide the order in which the inputs were triggered and be able to supply some of the necessary logic?
Thanks
Bill R.
[email protected]