Internet PLC Forum

General => Technical support => Topic started by: DW_Microsys on December 14, 2017, 11:32:35 AM

Title: FX PLC interrupt and simulation
Post by: DW_Microsys on December 14, 2017, 11:32:35 AM
Two things:

1. Input as Interrupt: it lost the function as a standard input.
    In old FMD series, if one input is defined as interrupt input (INTRDEF), it still works like a standard input. Which is very convenient.
    In F/FX PLC, once you define an input as interrupt (INTRDEF), then PLC doesn't treat it as standard input anymore.
    In my application, I define Input#1 as interrupt, which detect a switch signal. The system need to response at the rising edge of switch, but also need to use it to turn ON a light to indicate the status of switch. It doesn't work any more.

Any idea?

2. In simulation, is there a way to simulate the interrupt input? Click on the PLC Input doesn't do anything.

Best regards,

Daniel
Title: Re:FX PLC interrupt and simulation
Post by: support on December 15, 2017, 06:25:24 PM
I think you were referring to the old T100MD (not FMD) that an input can be both an interrupt input as well as a regular input.

Unfortunately, there is some the peculiarity of the Fx and FMD MCU hardware such that the input can only be read if the pin is defined as a general purpose I/O (GPIO). When a pin has been defined as an interrupt input pin, the firmware has no way of reading the logic state of the pin unless the CPU switches it back to become a GPIO pin.  As such the PLC firmware is unable to report the logic state of the pin once it has been defined as an interrupt input.

The only way to get around this is to tie the interrupt input in parallel to a general purpose input so that you can still read the logic state of the input by reading it from the parallel input.