Jump to content

Ken Hoang

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Ken Hoang

  1. Hi Flex. There are several actions being carried out in the subroutine. For the above example, the four conditions that activate the "Run sequence" subroutine are the four conditions required for all the actions inside that subroutine. To avoid conditional call of this subroutine, I guess I'd have to add the conditions for every ladder rung inside the subroutine. I'm wondering if there is a better practice to avoid conditional subroutine calls without having extra repeated code? Thank you.
  2. I've found a solution to the issue. It's the order of calling the subroutine. The below screenshot is in the main routine where the subroutine (Run sequence where I have MB12, MB33, Modbus etc) being called. I used to have MB12 go high first and then call the "Run sequence" subroutine which did not work. After swapping the two around, the subroutine is executed correctly as intended. Not working: Working: Thank you Flex and Ausman for your help.
  3. I've tried Reseting MB12 while the subroutine is called; but for some reasons, the MB12 couldn't be reset. I stopped the subroutine being called, so now MB12 is LOW, and manual SET the bit to make it go HIGH. MB12 did go HIGH but the subsequent elements are not activated. I have tried to 'Find' the bit and I can be sure that MB33 is being used twice only, as shown in the attached screenshot above. This subroutine is being called for sure, as there are other nets below this and they all execute without problem
  4. Hi Ausman, Thank you for the suggestion. I've tried to Initialise and Reset, unfortunately, the issue is still occuring. Regarding your question, MB30 (function in progress) is a bit that is HIGH is the device busy sending out a MODBUS command. If I have the positive transition contact of MB12 goes straight to MB30, that net will only be carried out for one scan; and if at that time, the device happens to be busy (MB30 is HIGH), the desirable MODBUS command will not be executed., hence the need for MB33.
  5. Many thanks for your detail instruction. I have tried what you suggested and the increment function is not being activated As before, the subroutine is called, and MB12 has a positive transition but MB33 and the increment function is not carried out. For your question, MB12 is reset during start up and also when the stop sequence is activated. The routine shown above is in the run sequence. I've checked and the state of MB12 is definitely HIGH during the above operation.
  6. Regarding the high number of sessions, my MODBUS slave goes into error mode if it doesn't receive a command from the master for 3 seconds. The master is set up to check the state of the slave every 0.5 second, hence the high number of sessions. Also, when I delete the MB 33 contact, the code works fine: This is not ideal, because I want to send the 'motor ON' command once only. This will repeatedly send out the command as long as the subroutine is called.
  7. Many thanks for the replies. Yes the Reset for MB 33 would normally be placed just after the MODBUS command. However, to show that it's not working, I've deleted the Reset on the right. MB 33 is also reset during start up to ensure it's LOW in the beginning. MB33 are only called twice as shown above. This subroutine is called by the main routine. Everything else execute fine but just these two rungs are problematic.
  8. Hello, I'm currently having issue with the positive transition contact. When MB 12 (Run ENABLE) goes from LOW to HIGH, the positive transition contact is activated but for some reason, the coil down stream of the contact is not activated. Please see the screenshot below. This is a standard 2-net routine for a MODBUS command. Any help is much appreciated.
  9. Hello all, This is my first time working with Unitronics product and so far so good. I'm currently using the Samba SM35-J-RA22 to develop a control system for our product. On the home screen, we display the machine status and some operational parameters. Due to the small screen size, I'm looking for a function like the "List of Texts: by pointer" but with numerical values linked to MI instead of fixed text. At the bottom of the image below, as the user press the up/down button, the parameters should cycle through a list. I can make the parameter name cycling through using the "list of Texts: by pointer" but I couldn't find a way to do the same with the associated numerical values. I guess one way around this would be to have multiple display screen and when the user press the up/down button, the display jump to another screen with the appropriate parameter. However, this means that it'd require 5 displays for 5 parameters as an example. Another issue is the image quality. Even when I use high quality icon, when imported into Visilogic (and on the unit display), the image become quite broken. Is there a way to improve this? Any help is much appreciated. Ken.
×
×
  • Create New...