As William indicates, you should fire the file-reading FB with an
event from a SIFB such as E_CYCLE or E_DELAY that provides a separate
thread of execution, since java.io.InputStream.read() is a thread-
blocking operation. But how you fire the block depends on what you
want to do. Do you want to read the file character-by-character or
byte-by-byte and send each character or byte on with a CNF ? Or line-
by-line, or even the entire contents of the file? That also determines
what subclass of java.io.InputStream or java.io.Reader you encapsulate
in the FB. Also, how do you plan to deal with end-of-file or other
exceptional conditions?
- Jim Christensen
On Jul 7, 9:08 pm, William Dai <
william...@gmail.com> wrote:
> Using E_CYCLE FB to trigger your FB, it has duty cycle time as a
> parameter setup.
>