Search the Community

Showing results for tags 'Subroutine'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 5 results

  1. Hello, In sysmac studio, for a NA hmi, is there a way to access a button in Visual basic from a global subroutine ? I always get this when i compile : error BC30456: 'MyPage' is not a member of 'My_NA_HMI'. the code is : My_NA_HMI.MyPage.myButton.IsEnabled = True   Regards,
  2. For some background information, I am in the process of converting a Mitsubishi FX2N to a Siemens S7-1200. I am viewing the Mitsubishi program with GX Developer Version 8.116W. There is this subroutine in the Mitsubishi program that appears like it will never run. I think the purpose of this subroutine is to clear the status of the devices in the PLC. I have attached a picture that demonstrates what I am dealing with. Can anyone tell if the subroutine P7 will run at any point? Thanks! For those who are not used to the Mitsubishi world or want to brush up on their Mitsubishi knowledge, below is some information regarding the devices and functions used in my example: M8000 - Always on bit (turns on when PLC is running and turns off when PLC is stopped). M500 - Just some random memory bit I chose. FEND - Indicates end of main routine program (everything below this rung is either a subroutine or interrupt routine, so it will only be processed if called from somewhere). P7 on left side of power rail - This is a label that indicates the beginning of the subroutine called P7. M8031 and M8032 - Special memory bits that, when set, tells the PLC to clear certain devices. SRET - Indicates end of subroutine.
  3. Understanding Subroutines

    I just want to make sure I understand how Subroutines function. If I have a main program and it calls a subroutine, the main program will no longer scan the ladder until it returns back from the subroutine. OR does the main program go ahead and continue to scan the ladder even though the subroutine is scanning it's ladder. Please advise
  4. Subroutines

    If I have a simple program, let's say with just 4 rungs, each rung compares an analog input, and depending on the analog reading each rung might jump to subroutine. So if the first rung jumps to the programmed subroutine, is the main program still being scanned, or does the scanning process go along to the subroutine and not come back until the return to main program. Thanks
  5. Am I right in thinking that you can't pass arguments into a subroutine (SR Section) in Unity Pro? I am using v8 and can't seem to find a way of doing it. I want a reusable function that I can just call on demand, so a subroutine is perfect. But I need to call it with different parameters. Will have to be a DFB is this isn't possible, I guess.