Search the Community
Showing results for tags 'ladder logic'.
Found 91 results
-
Hello, I have a subroutine error that I cannot figure out. I had about a 45k step ladder project with about 50 subroutines running great. I decided to add another subroutine and I get this error (attached.) Error H33E7 which means there is some structural ordering issue. I have had this before and it was always that I forgot my RET or I deleted a RET on accident after a subroutine definition. No prob, easy fix. However, that is not the case with this issue I am having. After cutting code out of my project until the error went away, it came down to specifically this: (see simple code attached) This is a test project separate from my main project to replicate the issue. Notice in the Navigation panel that I have two POU's under main program. POU2 shown in the picture is M0 controlling a call for P1. FEND, then P1 is defined as a simple INC Z0 and then RET. This is the exact 'structure' in my working subroutine ladders but with much more complex operations; where, I define 50 or so subs P1-100 thereabouts, and call them throughout my other POU's, and each sub is 25-100 rungs. This code you see does not error until I added POU1. Meaning, building and simulating POU2 by itself will work. Adding POU1 is a simple SM401 (always off) controlling INC Z1. Its just a dead line to make POU1 a thing when compiled. Then I get the error. No matter what is in POU1, the error will exist. This basically means I cant have any other POU's without a structural error when using subroutines. In diagnostics while simulating (and on the FX5UC PLC unit I have, I tested if it wasnt just simulation), I can jump to the error line. It will always point to the first line of POU1. This is important to note: in my full program with the 50 subs, when the error occurs, it will pick one of my 7 POUs and say error at the first line of it. If I unregistered that POU that is marked, the error will simply jump to another POU, and so on until it was reduced to basically the sample code I showed in the attached. The error went away when it was 1 POU. But in my working project (before implementing this sub that caused all this issue) all these subs work and there are several POUs. I spent a 2days on this so I am just g oing to copy paste this code I intended to sub many times just to move forward, but I want o understand what is the hangup. The test project was me just trying to write a sub again and apparently I cannot anymore. Thoughts? I appreciate it, thanks.
-
Hi Guys, I need your help to understand the ladder, what is the meaning of &4200, could be with a limitation number? thanks,charls
-
I have an interesting problem here... In my program 'OperatorMessages' I use MOVE logic to receieve an integer, and display the visibility of the bit if its ON/OFF, this is stored on a datalamp which displays a color for whatever bit is triggered via HMI (help2.png). I have 2 tags here, HMI.MessageLT and HMI.FuncMSG, they are both under the same UDT and are both INTS. You can see that when Machine.Mode.Auto is SET HMI.MessageLT holds the INT value.When Logic to the Left is RESET the INT value is placed back to 0. So my HMI.MessageLT is working perfectly, BUT the HMI.FuncMsg does not reset its bits. (images below) So you can probably image that on my HMI Data lamps, the DataLamp which takes HMI.MessageLT as a variable dissapears and reappears accordingly with the triggered bits, but the DataLamp which takes HMI.FuncMSG is not dissapearing, so when RESET it still displays as if there is an error because the bit is not resetting. Headache.
-
Hello, I have a PIDE Instruction to control a control valve. The CV minimum is 6% and Max is 100% But when ever the SP is not reached and it has to lower the CV it goes to zero rather than maintaining minimum of 6%.
- 1 reply
-
- allen braldey
- plc
-
(and 10 more)
Tagged with:
-
Hi all, I have a program I am editing in ladder mode It is getting quite large, nearly 30k steps now At some point after a continuous paste (I think) the editing has become glitchy If you try and change an item it inserts the new one and keeps the old one It puts in horizontal and vertical lines seemingly randomly which you have to play around to delete before conversion It is only this one program I tried editing on 2 pc's, no different I cant find anything in mitsubishi manual Has anyone else had same issue? Thanks in advance
-
Greetings Can someone tell me about a memory that saves the data even when the machine is turn off? I need one for a speed pulse for a driver and all the memorys that I used where not saving the data. The PLC is an FX3S-MT32
- 2 replies
-
- fx3s
- mitsubishi
-
(and 2 more)
Tagged with:
-
I'm working with Emerson 90-30 on proficy machine edition and I'm trying to use a string variable to display words on a graphical panel in target 2 but withing the code itself on target one I cant seem to understand how the reference address works? can some one explain how string variables function and how to use them?
- 3 replies
-
- plc
- ladder logic
-
(and 1 more)
Tagged with:
-
Hello my brother and sister at this forum, please help me, my problem is after i make ladder diagram and iam click button simulation -> Work online simulator ( CTRL + SHIFT + W ) then appear warning "failed to start ladder engine", what a problem?? thanks before
-
Hi New here. Trying to create a cumulative timer with zelio soft 2 for a SR2B201BD So, whenever the plc receives a pulse (coming from a coin acceptor) it adds x amount of time, whenever receives a second pulse, adds x amount of time to the time left on the timer. This is a timer for a self serve car wash. Used to work with Ecostruxture Machine and a TM221, but do to a stock break on the supplier and time sensitive project was forced to change to a sr2. Can't seem to make the transformation from my program on ecostruxtur to the zelio. Any help? Thank you
-
I am trying to use Reusable files, but it is greyed out. Is there a setting that needs to be enabled to activate it? I am using CX-Programmer v 9.74 Update 1: Apparently, when you create a data structure this gets greyed out
-
Array A INT[32] Array Index B INT Destination C INT I am trying to move an Array (A) Element (A[2]) using a symbol (B) in ladder into a destination symbol (C) C = A [ B ] Result: ERROR: Array Index of Operand 1 out of range at rung 1 ( 6, 0 ). The documentation suggests that it is possible, but I am unsure if there is something I am doing incorrectly. Note* Fixed indexing works with no errors Is there another method to accomplish this? PLC : CJ2M CPU31 CX- Programmer: Verion 9.74 Update 1: If I go online to the PLC It does look like the array look up is working. Is the issue with the mov block? Update 2: I changed the memory locations which has caused a different error to appear. This error is clearer but does not explain the manual excerpt I posted further up ERROR: Only the constant can be specified for the index of the array. at rung 5 ( 6, 0 ). Update 3: Solution 1 I managed to hack together a proof of concept using pointers and indirect offsets Update 4: Solution 2 For some strange reason things work as expected inside of the function blocks so I made one where the array is In-Out and with an input and output respectively. Note* External reference to pointers inside of the function block produced an error. Function block Logic Update 5: Solution 3 Now I feel like I am going crazy, I tried just the original code again and it works... I have no idea why and if it was not for all the documentation I would be lost as to why it works now... Update 6: Conclusion It seems to have array indexing work the array index must exist in the D Memory Block. The reason it did not work above is because I somehow had a MOVR block when I tested after moving all the variables to the D Memory Block. I hope this journey helps someone else :)
-
1
-
- omron
- cx-programmer
-
(and 8 more)
Tagged with:
-
Most Important Scripting Language For Controls Engineers
OmronOmicron posted a topic in General Topics - The Lounge
As the industry of plc and scada softwares continue to integrate more and more programming languages into their IDE, what is the most common language that should be learned by controls engineers (excluding Ladder Logic)? I mainly use Python and VB for scripting but I am curious what languages other SCADA and PLC programming environments use. Should I be sticking to a specific language and learning it well or just know a little bit of them all? Let me know your thoughts!! -
Hello to everyone. Nice to meet you all. How are you? I hope you are doing well. I’m developing a program with the purpose of make something similar to a pulse train in the output. However, sometimes I need the output to be a “positive” pulse and sometimes a “negative” one. By positive and negative I mean the polarity in relation to the pulse train source. I’m trying to use a pair of bits in order to switch between the two choices of polarities. I attach a simplified version of the ladder diagram I’ve made. When I thought about the logic, it seemed logical to me, however, it isn’t working as supposed. SM0.4 is a pulse train source. According to the software manual, it is a pulse train with 50% duty cycle and a cycle time of 2 s. That it to say it says at TRUE for one second and return to FALSE for another second. I assign the value of that variable bit to the M0.0 memory bit. I get the negative version of the pulse train logically negating it in the Network #2. I assign the value of two inputs, I0.0 and I0.1, to other two memory bits, M0.1 and M0.2. · When both inputs are in a FALSE state, the output stays FALSE, disregarding the state of SM0.4. (Case #1) · When I0.0 is TRUE, M0.1 is TRUE. However, Q0.0 stays at FALSE no matter SM0.4 is TRUE or FALSE. I attach a pair of pictures. (Case #2) · On the other side, when I0.1 is TRUE, M0.2 is TRUE. In this case, the output shows the correct behavior. It is the negated version of the pulse train source. (Case #3) Has any of you experienced something similar? Is there a better way to execute my purpose? I’m not executing the program, just simulating it with KincoBuilder from Kinco. However, it has always worked fine for me. Thanks for you attention. I look forward for your responses. Kind regards!
-
Hello Dear Engineers; I am a PLC beginner learner, so please do not my my question as it sounds little ignorance my question is; how can i insert two output instructions in parallel but from the same input instructions. kindly check the drawing attached, the problem i can not find the right tool in my RSLogix 500 software. please help me and i do highly appreciate that. best regards, Kevin
-
-
Hey, (Programming a M224 with Machine Expert Basic) I'd like to get some input from you guys about a logical task: I have 8 contactors controlled by my PLC outputs, they heat a water boiler. throughout my operation, I require a different amount of heaters (I could move between 1-8 heaters in a single operation) I would like to scramble what contactors I put in use every time I start an operation, in order to not constantly use the same heating elements and wear specific ones out. For example, in the first stage of heating I will use contactor #1, next time I start the operation I would like to use contactor #2 and so on.. How would you approach this problem? SBR? Timers? Thanks
-
Hello everyone, may you all bless with the best. Can anyone please help me on connecting and programming In Modbus rtu INVT CHF-100A vfd with FX2n having rs485-bd module. I want to connect 11 vfd and one fx2n plc also .
-
Hello everyone, may you all bless with the best. Can anyone please help me on connecting and programming In Modbus rtu INVT CHF-100A vfd with FX2n having rs485-bd module. I want to connect 11 vfd and one fx2n plc also
-
Hi, Could anyone help me out on how to extract the digits present in a string in sysmac studio... Thanks in advance !!!
- 11 replies
-
- sysmac studio
- ladder logic
-
(and 1 more)
Tagged with:
-
Newbie in the field of Automation here! I have a waste water project that requires operating 6 pumps to empty a sump. The water level in the sump is being monitored by an analog ultrasonic sensor. The analog range is divided into 5 levels; level 1 being the lowest and level 5 being the highest. The way the pumps operate is analogous to the water level, i.e., 5 pumps will run at level 5, 4 pumps will run at level 4, 3 at level 3, 2 at level 2, and only 1 pump will run at level 1. The sixth pump is used to run the pumps sequentially and that's where I need help. Basically, the pumps can not be assigned to a certain water level as this would result in the pumps at the lower level run way more as compared to the pumps assigned to higher levels. The pumps need to alternate so as to keep the running hours of each comparable. Another requirement is that say if pump 1 turns on due to water level rise and then turns off due to water level fall, and again if the water level rises, then the next pump should start instead of pump 1, and so on for the rest of the pumps. Also, if one pump goes on some kind of fault, the 6th pump comes in and runs in its stead until the fault is reset. I'm trying to come up with a ladder program to make all this happen but hoped that I could find some help online. I feel like this is a common project and there should be someone that can give me the proper solution. With thanks, Aafaq.
-
According to picture 1, ''Piston A moves to the right. After the set time, K = 4, the normally closed timer T450 contacts open and the normally open timer T450 contacts close.'' But according to picture 2 After the power flow from Left power rail to right power rail, it should directly go to 2nd rung and cause the normally open timer T450 contacts to close only right? but why it will go back 1st rung and cause the normally closed timer T450 contacts to open? Anybody can help explain me regarding this. Thank You in advance
-
Hello Everyone, I am writing one logic and need some help regarding that logic. CURRENT LOGIC - -There are two timers TON_1 and TON_2. -TON_1 timer will start as soon as PLC turns on. -After the done bit of TON_1 timer, the TON_2 timer goes on. -After the done bit of TON_2 timer, again the TON_1 timer will start. -This logic cycle will run continuously, both timers will run turn by turn. Code (Codesys/Schneider Eco Structure Machine Expert)- PROGRAM POU_1 VAR TON_1: TON; TON_2: TON; END_VAR TON_1(IN:=(NOT(TON_2.Q)) , PT:= T#100S); TON_2(IN:=(TON_1.Q) AND (NOT(TON_2.Q)) , PT:= T#20S); Actual Requirement - -There is a BOOL tag. -If the BOOL tag gets high during the TON_1 running, the logic should move to the TON_2 immediately. -If the BOOL tag does not get high during the TON_1 running, the logic should move to the TON_2 after completion of TON_1. -after the completion of TON_2, again restart TON_1. -Logic Runs continuously in a cyclic mode. Give me your valuable idea to fulfill the logic requirement.
-
Hi All, Please see attached screenshot: Whenever I want to save the ladder program or start simulation, this window pops-up. If I press 'yes' I loose the whole work. I tried to open existing program and modify it, but it did the same. When I clicked 'yes' I lost all modification and just the original program remained. (I made the program in the morning, opened and saved many times but it started popping this window later.) I work with FXCPU series, FX3U/FX3UC type, simple project in ladder. This worked well but now is not anymore. I use Melsoft GX Simulator! Can anyone advise why this is happening? It is very annoying! It is pointless to work on anything now! Many thanks
-
Hey folksI'm trying to make a Ladder program in Sysmac Studio to control a Crane.The crane gets via a HMI a position that it must drive to, first at high speed then in low speed this is controlled via encoder signal for fine positioning there are several sensors.For all this I have an NX1P2-9B24DT1, NX-EC0222 and 3G3MX2-A4030-ESomeone here who can help me with an example of how this can be done in Ladder.Many thanks in advance for your help.
- 1 reply
-
- sysmac studio
- ladder
-
(and 3 more)
Tagged with:
-
Hello everyone, I am new to PLC programming and will start working on Allen Bradley PLC. I have an experience in computer programming languages. Will learning ladder logic be a better option or starting with structured text as i have some knowledge about the syntax and programming of structured text?
- 9 replies
-
- plc programming language
- structured text
-
(and 1 more)
Tagged with: