Search the Community

Showing results for tags 'plz help to stop/run my function by clicking button'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 50 results

  1. Latch switch

    Hello  I'm quite new with GT Designer 3. I'm writing code for the GOT2107 HMI. I have a few push buttons that works fine when pressed the switch lights up as you touch the switch. But now I want a latching switch. Every time the switch is pressed the light on the switch should alternate. How do I get a switch's lamp to stay on after pressing it?   Thank you Marinus
  2. I can debug my plc app with simulator. I created some function block, and inside functionblock I can inspect in and out parameters, as well as local variables. But in/out parameters values are not shown. Any solution? Im using Sysmac Studio 1.29.2 and selected a NX PLC in my project.
  3. Hi everyone, Using Cicode programming ... I'm try to make a function empressed Button's input command that still running forever until the user press the Button again .. so if i press the Button at first the function inside Button will be running , But i wonder to terminate that function by press same button second time or don't mind if you suppose other Button for stop running the function ... plz help to make a code or something else to stop running of my function.
  4. Function Block addressing

    Hello all.  I have a program which has 8 function blocks. I recently added extra functionality to one of the programs (not the function blocks). I added the new variables to the global symbols table and added the new code, but when I compiled the new code, the variable addresses in three of the function blocks had changed. This is a problem, because we use memory cassettes to download new versions of code, so when the new version is downloaded to a machine in some far flung part of the world, these variables will be overwritten (they are hours run variable, so are important for servicing purposes).   My understanding is that CX assign's variable addresses in Function Blocks and we have no control over this. Bit if I only added variables to the Global symbol table, why are the FB addresses affected??   Any input appreciated. 
  5. Pointer Device memory

    To those who don't know the GX Works2 compiler treats any function block referenced used in your code as a place to copy the entire set of code data into your program. Function block calls are not handled like pointers even though the should be. [You'll consume all your pointer space by thinking function blocks are great.]
  6. Hey, I recently started trying my hand at creating function blocks. At the moment I'm trying to create a PID function block, however I keep getting this error: "ERROR: Variable does not have enough size." No idea why it does this. Can anyone help?  
  7. Help needed with MM430

    Hi everyone, Now I used Micromaster 430 controlled by a PLC. I set parameters as follows: P0010: 0  P0100: 0 P0700: 2 (using BOP-2) P0701: 1 (start) P0702:12 Terminal 3+4: Connected to Analog output of the PLC  Terminal 5: connected to 24V via a relay which is controlled by the PLC DIP switch1 on (analog input1 with 0-20mA) When I turn on the relay to power to terminal 5, the inverter runs about 5 seconds, then stop automatically while terminal 5 is still powered. There are no fault and no alarm. I checked the parameter P0947 and P2110 with value 0. Especially, when I set P0700 = 1 (using Start button in Panel), the inverter runs well without stop automatically. Please give me some solutions.  
  8. Hi Guys I was wondering if any one of you could tell me how to set up some basic button functions? I need a basic instruction on how the followering button setup, could be done on the HMI, preferable with exaples or tutorials etc. !!! I´m working with the current setup: NX1P2, using Sysmac Studio, Module version 1.25.1.0, along with a NA5-Terminal, version 1.18 !!!  START_VALVE_1_BUTTON = Toggle, Momentary, Set or ?? - (Need the START_VALVE_1_BUTTON to activate ON_BUTTON & OFF_BUTTON flashing, indicating selection option, ON or OFF, meaning activating start valve 1 mode, or deactivate the mode). START_VALVE_2_BUTTON = Toggle, Momentary, Set or ?? - (Need the START_VALVE_2_BUTTON to activate ON_BUTTON & OFF_BUTTON flashing, indicating selection option, ON or OFF, meaning activating start valve 2 mode, or deactivate the mode). ON_BUTTON = Toggle, Momentary, Set or ?? - (Need the OK_BUTTON & the OFF_BUTTON to flash simoustaniously, after START_VALVE_1_BUTTON, or START VALVE_2_BUTTON has been pushed). OFF_BUTTON = Toggle, Momentary, Set or ?? - (Need the ON_BUTTON & the OFF_BUTTON to flash simoustaniously, after START_VALVE_1_BUTTON, or START VALVE_2_BUTTON has been pushed).  !!! Hoping to hear BACK from some of you VERY soon, because I need the know_how ASAP. !!! !!! Write soon !!!
  9. Internal function block variables

    I have a function block where the first internal variable is showing as address H1420 in the Global Symbol table. When I add another retained variable to the function block then save and compile the code, the variable address in the global symbol table shifts from H1420 to H1488.  I need to retain the address as I will be downloading code and I need to ensure the address if H1420 stays with that variable.    Can anyone help with this?
  10. Remote Run/stop on FX0

    Hello, I'm working on a project where I'm trying to create Remote Acces to old PLC's. The Mitsubishi FX0-20MR-ES is one of those PLC's. I got the remote access working by using a Serial to Ethernet converter, but I just found out that FX0 serie can only be put in Run or Stop mode by manually flipping the RUN/STOP switch on the PLC. I was wondering if there is any software solution that enables me to "simulate" the stop function while the switch is still set on RUN. That way I can still program the PLC from a remote location. I know this is possible with some PLC's by turning off a whole registry in the software, that way the PLC thinks it is in STOP while it's actually still running. I just don't know how this would work with the FX0. I hope someone can give me the solution I'm looking for. I'm looking forward to the reactions, Jimmy
  11. Omron Function Block variables

    Hello all.  I posted earlier in the week regarding downloading new code to an Omron PLC, but I think the question was a bit vague. As a follow up, and hopefully to clarify, I have the following query. I have created an upgraded program which will be downloaded by field techs using memory cassettes. The revised area of code is essentially a Function Block which amends service lamp behaviour, and in creating it, I have amended the existing function block and added new Internal variables. Is there any way I can ensure that the new variables don''t over write or move the existing  variables in the PLC, because this is what is happening when I download it.    HELP!!!!!!!!!
  12. hello.   I've been trying to communicate this omron plc CP1L-EM30DT1-D, with a yaskawa inverter cimr-vu4a0004faa. but i can't figure out how to make de correct mov or configuration in de DM. i need to run/stop, change frequency.    some help, please. :) 485PRUEBA.cxp 485PRUEBA.opt
  13. Hi All, I am doing an application that use servo motor to feed plastic film to a target length (set by operator), and it need to stop immediately if marker sensor is ON. This application is control by Omron CP1E PLC. It will feed plastic film in 500-1000mm/s depends on the target length set by operator. It is require to stop immediately if the servo feed length more than 90% of the target length and the marker sensor is ON. However, is there any possibility for the servo to stop immediately once the condition is meet? As I am using PLS2(887) to feed with target length, and INI(880) to stop immediately, however, it cannot get the desired result as servo not able to stop immediately after marker sensor is ON, I am not sure is because of the PLC scan time, or servo need time to deceleration (deceleration rate assigned to #FFFF). Appreciate anyone able to assist on this. Thank you.
  14. Hello all. I have been working with an SLC 5/04 system, which houses various Digital and Analog INs and OUTs, up to Slot 29. I am currently mainly working with Slot 25, an Analog Input: 1746-NI16I. This is a system which has already been set up and has been running for the best part of 8-10 years. This particular card has had some spare inputs, one of which I am trying to connect to. In the Advanced Configuration, only a few Channels are actually "Enabled", and each channel is pretty much slightly different from another in terms of Input Type, Filter Frequency and Data Format. I am trying to set up Input 14, which is Channel 15, to "Enable" it, 4-20mA Input Type, Filter Frequency of 6 Hz and Data Format of either Raw/Proportional or Engineering Units. Now, after I have made my choices, I click apply, and then OK. I am then confronted by a pop-up which states: "Configuration Rung and Data Integer Data File Number: 25 Integer Data Element: 100 Rung to be inserted: XIC S2:1/15 COP #N25:100 #O0:25.0 24 At Program File Number: 4 82" I have the options of OK or Cancel. If I click OK, I now have LAD 4, Rung 82 Highlighted. This First Scan Bit and COP function were already here, but does that mean I have now altered what is being written to "#O:25.0"? I now Download the Changes. However, after all this, I am not getting any Analog input reading coming in from the Live PLC. What is this COP function? What does it do? How do I properly set up this Analog Card?   Thanks for your time, -Jame
  15. Hi, I have some trouble with a CJ2M-CPU33. My client did a backup to memory card earlier today, and after this we did some changes through remote link. Now the client wanted to restore the previous backup to the PLC and has done so, but the system would not function correctly. After going online on the PLC it seems like the PLC is stuck in "Stop/Programming Mode". When trying to change to "Monitor" or "Run" mode a dialog comes up containing the following message: "Failed to change the operating mode. The operating mode may be still changing in the PLC."  - All the dip switches are set to off after restoring backup - The PLC has been rebooted  - I have downloaded the application again through CX-programmer  - Verified that the PLC is set to start up in "Monitor mode" But nothing helps. The same message comes up when trying to change the operating mode.  Hoping anyone can help to resolve this issue as it is very critical for us and the client. In advance, thanks for any tips or help received. Best regards Stian
  16. Dear All               Could you people help me to solve this issue. I need a Function in cx-supervisor with Push Button.I want Bit ON, when I pressed the button, and when I release the button then this bit goes OFF. Sorry for my bad English its not my native language.
  17. Hello. How can I get bit addressing of defined variable in function block? For example: - I define variable type DUINT with name Double_VarI_INT. - I want to get or set one bit out of it (its double word). - If I use Double_VarI_INT.0 I got error. Best regards.
  18. Gx Works 2 ve fx2n için bir fonksiyon kütüphanesine ihtiyacım var. Servo ve step motor kontrolü için.   thank you
  19. Is there something to open a message box with confirmation (Yes / No) when the operator click on a button, like in cx-designer Or do I have to code it in Vb.Net Thanks
  20. Struct as FB input

    Hello,  I am trying to define a struct as an input variable for a Function or Function Block. For example the function AddDelimiter (This is a standard Sysmac function), has a input variable with the variable type Struct, an it is possible to couple a struct to this input (See picture below). If i try to make my own function block with a struct or Structure as an input data type, i get the following error (See picture below). When I try to define a struct from the data types (In this case struct: Test) it doesn't give a error. But when I try to couple a struct to this input, that is a layer deeper than the function block struct i get the following error (See picture below). How can i define a struct as an function/ function block input? Thanks in advance.
  21. I’m using a Omron NJ to manage a LinMot linear motor .. all is going very well; however, there have been a few times during this development phase when the actuator, or programming creates a fault, perhaps from a following error, or exceeding a limit.  The result is sometimes scary.  The actuator might accelerate into a hard stop.  Not a big deal, the ends are protected with Sorbothane, so it isn’t a big problem .. yet.  Once the system is correctly programmed, it shouldn’t ever accelerate an actuator into the hard stops. In spite of my newbie-ness  to Omron programming I’m aware of the need to employ error & fault action that will stop a run-away actuator in closed-loop control, rather quickly. Just how to do that.. has evaded my research. I’ve noticed:  “FaultHandler”  in the W507 & W508 Manuals. And, been quite frustrated to not find any reference to FaultHandler or FaultHandeler()  .. which kinda suggests it’s a program?… and also expected to get some clues in the "NJ Programming Best Practices V1.1”   so far… no luck. Perhaps I’m going about this all wrong..  The LinMot Driver Controller might be the way to go.. An error message from the NJ to the LinMot drive would quickly shut down movement in closed loop .. instead of turning the motor into a rail gun… Any suggestions at how to do it with the NJ,  would be greatly appreciated.. Thanks Regards, Michael PS: here’s the progress so far, thanks to many out there, and on this forum ... https://www.youtube.com/embed/B0UGm9JTw3U?rel=0  
  22. Anyone ever used a Wait-for digital tag in a C Program? I have to use C in the Red Lion Programs.. but, I'm not at all proficient in C (or anything else for that matter ..) Here’s a nice problem for basic C programming .. I really need to solve it .. but, so far ... can't ... sigh!: I have an actuator that will be commanded to make sine wave motion.  The program that does that, in the actuator’s driver-controller, requires the actuator to first be in a zero position.  Homing has already been done, so the drive knows where the actuator is.  I cannot modify the sine wave program; but, can command a Move Absolute program in the drive, to take the actuator to zero, if it isn’t already there.  When the actuator is at zero, it is “In position” and a digital tag will go True. If the Tag is False, the actuator is not at zero, it’s at some other position,  and only the Move Absolute program can return the actuator to zero. So, when launching this position command program, In a Red Lion G3 HMI, using only Basic C programming, how would you write a control program that would test the status of the actuator’s position, and, finding it at zero (the “InPos” tag is true) would start the Sine Wave program.  And, If the “InPos” Tag is false, would start the Move Absolute program, which would return the actuator to zero, and when the actuator is In Position, would start the Sine Wave program. Here’s the tricky part. It will take only a few milliseconds to start the Move Absolute program (if required) .. but how do you get the “C” control program you are writing, to wait until the actuator actually reaches zero, and the “inPos” tag goes true … which could take several seconds? I don’t believe there is a WaitFor function in “C” , and you cannot send either the Move Absolute, or the Sine Wave program more than once .. so, if a loop is used, it can loop only one time .. presumably with conditional delays. (however that's done)  You cannot use Sleep().. that would be cheating.. the full program must run in the least amount of time, and you do not know how far the actuator is from zero. You could use if (! InPos) or if (InPos) to qualify what programs to run .. but, where does the “Wait for In position”  fit into C Programming?  You might be able to use Continue .. but, ya still have to wait for “InPos” to go True…..before running the Sine Wave.       Thanks Much, Regards, Michael
  23. Urgent help CS1 CPU Stop

    Hello all, Require some urgent help on a project, apologies if poor explanation.... When CS1 CPU goes into stop mode in fault condition, eg fatal cycle time error, outputs retain in the state they were when CPU was stopped. In code we monitor CPU status and turn output high to pull in relay to indicate CPU status normal to wiring circuit. But if CPU goes into stop mode relay remains energise as code is not running to turn output off?? Therfore for examples conveyors keep running... How can we prevent this, can outputs be configured to go low if cpu stops? Any other ideas? Any help will be appreciate, thanks.
  24. 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.
  25. Profibus Function Blocks for Q2ASCPU for Melsec ST Lite RIO inter-connection. Please assist in advising the attainment of such blocks - if any existing. Thanks