Counter Issue Delta DVPSv2 PLC

So I am facing a wierd issue with a regular 16 bit counter in delta dvpsv2 plc. I have taken a physical input to trigger a count in a regular 16 bit counter. But the counters value doesnt increase. My program scan time is about 10ms but the sensor which is supposed to trigger the input stays on for more than 370ms between cycles. I finally had to use a hardware high speed counter to get around but I am unable to understand why a regular counter wont work. I have tried running the machine at the slowest speed also where the sensor stays on for almost a second and the highest speed where the sensor triggers on for about 170ms. I have tried using rising edge trigger instead of NO contact but still the same issue. the counters work fine with internal bit logic. its only the physical inputs that the PLC is somehow unable to register the counts. Or maybe its getting reset. I dont know. But no matter what, the counter value doesnt increase. I've also tried triggering the counter with a direct physical X input, and also by routing the X input to an internal bit and then using that bit to trigger the counter but still no change. Now if I use only internal bit logic where the bit turns on and off, that the counter will register immediately. Am I missing something here???
 
So I am facing a wierd issue with a regular 16 bit counter in delta dvpsv2 plc. I have taken a physical input to trigger a count in a regular 16 bit counter. But the counters value doesnt increase. My program scan time is about 10ms but the sensor which is supposed to trigger the input stays on for more than 370ms between cycles. I finally had to use a hardware high speed counter to get around but I am unable to understand why a regular counter wont work. I have tried running the machine at the slowest speed also where the sensor stays on for almost a second and the highest speed where the sensor triggers on for about 170ms. I have tried using rising edge trigger instead of NO contact but still the same issue. the counters work fine with internal bit logic. its only the physical inputs that the PLC is somehow unable to register the counts. Or maybe its getting reset. I dont know. But no matter what, the counter value doesnt increase. I've also tried triggering the counter with a direct physical X input, and also by routing the X input to an internal bit and then using that bit to trigger the counter but still no change. Now if I use only internal bit logic where the bit turns on and off, that the counter will register immediately. Am I missing something here???
Did you have a read on this manual:
1637573355787.png


For sure it can help !!

I have read it and all seems clear for me ..

Any time!
James
 
I assume you checked the output voltage from the sensor and made sure that it's above the threshold of the input card. If the voltage is good then it seems that the input is triggering faster than your code is scanning. Try using a pushbutton on that input to prove the code works. Does the HSC card give you a frequency of the input? If so you could calculate how long that input will cycle for.
 
Top