Jump to content

salt

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by salt

  1. 12 hours ago, Ausman said:

    I'm interpreting this as you want the master to send stuff to the slave that it immediately reacts to and subsequently updates it's own readings, which the master then reads after the updates are done. If this is correct, to me this all depends on the slave's capabilities, whether it's a dumb sensor or a bit clever. 

    cheers, Aus

    That's correct. The slave is a unitronics plc with hmi, therefore a user can also update operands. This operand is the "original" operand that participates in what the plc cintrols. A problem arises when there is a need for the "external" operand that the master accesses to be different than the "original" and to be also read and write from it, because for the master to read it the slave plc needs to constantly copy the "original" to the "external" and vice versa, and without any indication that the master writes to the "external" in order to update the "original" the master's value will be overwritten (depending on whether the net in which the slave's copy command was executed after the  master's connection).

     

  2. 10 hours ago, sgull said:

    Hi Salt

    Looking at your statement above I am wondering how you are calling your sub-routines.

    If you are using conditional calls on the subroutines you will get situations like you describe in your first post. If the routine is not being called continuously coils may just hold the last state before you stopped calling the subroutine.

    Regards

    Denis

    The subroutine are called one after the other with the intention of holding a bit's last state unless one of the subroutines makes it chagnge its state.

    I tried before to implement conditional subroutines with  several layers of parent subroutines but it really brings ladder diagram programming to its limits.

  3. Thanks for the helpful comments.

    A description of the program :

    There are several modes of operation:

    1- Standard process according to set points (3 temperatures and 1 relative humidity) by which some of 8 outputs are ON and some OFF in 8 states (combination matrix of 3 temperatures and 1 rh).

    2- external (by modbus) main switch. When on - the operation is same as (1), otherwise shut down of all outputs in particular order.

    3- operation in case of operational problems (detected by digital inputs). In this case, and depending on the detected fault , some of the outputs go off and stay that way for several minutes.

    Based on this I decided to dedicate each mode of operation to its own subroutine which run one after another, wherein 8 internal MBs change state before actual output.  Thise are overriden in order:  mode  1 then 2 and last 3. So the last mode turns off relevant MBs set beforehand.

    The snippets I posted above are from the third subroutine (events).

    Now, I see that I should have used resets instead of inverted coils, because I need only to turn false some of the MBs. DanT -so yes because of this coils were true instead of just going false in this subroutine.

    Ausman, I'll consider your suggestion on using vectors instead of MBs.

    I tell you all this because maybe you have another idea for the design of the entire program.

     

     

  4. Hello, I am programming the Vision 350 in Visilogic.  In the design of the process loop some conditions lead to simultaneous (or parallel) outputs.

    In the program, some of thoses outputs are represented internally by memory bits to be true or false before actual output in the scan cycle.

    The problem: putting coils (the "internal" MBs I mentioned above) in parallel does not trigger all of them. See net below:

    image.png.ad83827d4c3f8645d23d30d3efd5c614.png

    Trying an alternative doesn't work either:

    image.png.ac5d32b54d6ae6515fa34e798645f561.png

     

    Any suggestions?

     

×
×
  • Create New...