Jump to content

Flex727

MVP 2023
  • Posts

    3,325
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 7 hours ago, Arberhaziri said:

    but what happens if I go out from that display ? I'm not sure but I think the  OUTPUT will be low , but what happens with set coil ? Is it going to be  "reset" ? , or is it going to remain "SET"?

    What you are asking is why it is bad programming practice to have a subroutine called conditionally. Write your code such that every subroutine is called on every scan.

    To answer your question, any coil will remain in the last state it was in the last time it was executed.

    It sounds like you are WAY over-complicating your program. Unless there is a lot more going on than what you describe, you probably don't need a subroutine at all. Also, why do you need the "is displayed" operand for this? If the HMI screen is not being displayed, then you can't press the button. Why do you feel you need the extra check to make sure the screen is being displayed?

  2. I don't understand. You say you know how to multiply but don't know how to divide???

    Or is it you're just getting the wrong result? If you're getting the wrong result it's because you cannot store 53000 in a 16-bit signed integer format. Try doing the divide before the multiply. If that's not possible, read the Help entry under "32-bit long values".

  3. I haven't had occasion to use this object, but looking at it, it seems pretty straightforward. Did you read the Help entry? A Radio Button object just presents a set of mutually exclusive items that the user can select. Only one of the items can be selected at a time. An integer register will contain the index number of the selected item.

    Besides the Help file, you can also hover your mouse over each item in the Properties Window for a tip on how to use each item. Put it in your program and play with it until you understand what's going on.

  4. There are example programs that came with your VisiLogic installation. I strongly recommend that you take a look at the one for MODBUS TCP Master. Look in Examples/Version 900/Project Examples/Communications/Ethernet/Ethernet MODBUS IP/V280_Ethernet_TCP_MODBUS_IP_Master.vlp

    Your program still doesn't have a CONNECT function and you definitely do NOT want the SCAN EX FB. Also, what are you trying to do in Rung 6? You are attempting to communicate on every scan, and while that may be possible depending on the device you're trying to communicate with, your other communication functions will not work with that.

  5. I haven't run across this before, but as a general rule when I have issues with downloading I do the following:

    - Confirm the version of VisiLogic that you are using matches what version was originally used to download the project.

    - After making sure you have a saved version of the project, download a BLANK project to the PLC.

    - Download your original project again.

    - Now try Burn Upload Project again.

  6. Did you try placing a positive transition contact of SB 7 in front of one and a negative transition contact of SB 7 in front of the other?

    That should work in your case, but the proper way to do this type of communication is to set a bit periodically and place the following in series:

    Direct contact of the set bit,  inverted contact of the function in progress bit, the comm FB, then a reset of the first bit. That allows the function to "wait" while any other communication is in progress.

×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.