PartTimePlcProg
Member
Hi,
I only know how to read one bit of e.g. an input port, using e.g. I0.7 or names from the standard table for such a single IO line.
Is there some command to read all bits of an input or output port as a byte at once? E.g. the state of all bits in input module number 0, or 8, or 12, etc..
What I want to do is logging data, like all I/O states and statemachine states of a program due to a very rarely occuring error, to have a chance to see what lead to the problem.
So far what I've done is, using S7Connector.dll (the commercial one) to repeatedly poll all the I/O ports etc, but this is rather taxing on the little PLC & its ethernet facility, I don't get a very high update rate.
So instead I'd like to buffer a number of state changes inside the PLC before reading them over ethernet on the PC, not only reducing the overhead but also not missing any changes.
It's more efficient and insensitive to changes to just always read the whole ports as opposed to query all those individual IO lines...
I only know how to read one bit of e.g. an input port, using e.g. I0.7 or names from the standard table for such a single IO line.
Is there some command to read all bits of an input or output port as a byte at once? E.g. the state of all bits in input module number 0, or 8, or 12, etc..
What I want to do is logging data, like all I/O states and statemachine states of a program due to a very rarely occuring error, to have a chance to see what lead to the problem.
So far what I've done is, using S7Connector.dll (the commercial one) to repeatedly poll all the I/O ports etc, but this is rather taxing on the little PLC & its ethernet facility, I don't get a very high update rate.
So instead I'd like to buffer a number of state changes inside the PLC before reading them over ethernet on the PC, not only reducing the overhead but also not missing any changes.
It's more efficient and insensitive to changes to just always read the whole ports as opposed to query all those individual IO lines...