12/2/2016 7:12 PM | |
Posts: 50 Rating:
|
Hello Guys... Hope you are all doing fine... I need some help with the below I did a simple project, using Siemens S7-1212C, a contrast sensor and an encoder to measure the print length. When the contrast sensor meets the ink-mark, the signal is given to I:0.1 of PLC, and encoder is connected to I:0.0 (High Speed Counter). So when contrast sensor meets ink-mark, it gives a pulse to PLC, and the encoder count is moved to a temp memory and value is datalogged and count is reset, and when the next contrast signal comes, the encoder count is moved to memory, datalogged and is reset... So this way, the length between two ink-marks can be obtained.The program works fine if i do all above in a cyclic interrupt. But when i tried hardware interrupt, i can see the hardware interrupt being activated every time sensor signal comes (which is 3-4 seconds). But if i use the same input (I:0.1) to move inside the hardware interrupt, it doesnt work (see pic) So I activated rising edge hardware interrupt on I0.1 (for contrast sensor), and you can see what i have done on the pic attached... How to make this work, when the sensor signal comes every 3 seconds, the encoder value should be moved, datalogged and then reset.... move and reset are working, but not datalog write... Attachmentsiemens hi.pdf (542 Downloads) |
Last edited by: JAC2016 at: 12/2/2016 7:15:16 PMLast edited by: JAC2016 at: 12/2/2016 7:18:23 PM |
|
Follow us on