OMRON PLC jump instruction error

lpons

Member
Join Date
Oct 2013
Location
Toronto
Posts
9
Hello Everybody,

I have a big problem and I'm currently stuck in how to solve it. I'll try to make it clear as much as I can but any question is welcomed! So:

A client of my company has this workcell controlled by a OMRON PLC. What this workcell does is: identify a part, print a label (sending a network request to a server), then checking the applied (by an operator) label and finally release the part. I'm in charge of introducing a modification regarding the printing part: instead of send a network request to a server I've implemented a serial com algorithm in order to print the label directly from the PLC (an industrial printer is attached to the front serial port of the PLC). So basically I haven't changed deeply the code, just introduced an independent print routine which doesn't influence the rest of the code. So, this is what I'm working on.

My problem is: I want to speed up the serial TX (theoretically 1.5 secs) without executing all the PLC instructions but just only the printing routine (which is basically buffering the data to send to the printer cycling through a logical path based on the cycling ability of the PLC itself). So I've inserted a JME(005) at the beginning of my printing routine (after the initialization part) and a CJP(510) at the end with its condition transitioned from OFF to ON at the end of my printing routine (last logical state, when the routine is finished). What I'm expecting is, once the printing routine is entered, the PLC cycles only through the printing routine jumping all the rest of the code. What I get is "probably" (not really sure it works) jumping the rest of the code and when it encounters the termination jump condition the PLC simulator breaks down, literally crashes! No clue about why!

I went through the documentation of the CJP instruction and found this passage:

"When JME(005) precedes the CJP(510) or CJPN(511) instruction in the program, the instructions in-between will be executed repeatedly as long as the execution condition remains OFF (CJP(510)) or ON (CJPN(511)). A Cycle Time Too Long error will occur if the jump is not completed by changing the execution condition executing END(001) within the maximum cycle time."

which is a little bit obscure to me. If I got it right, how can I complete the jump with an END instruction if the END instruction is outside of the code I'm executing??

Hope anyone can help, even just clarifying the documentation or explaining to me how jump instructions work on a PLC. My background is more classical software programming so it's probably I'm not following the real Ladder Logic paradigm.

Thank you so much

LP
 
Thank you for replying me back.

I actually found a solution and also, I think, an error in OMRON documentation.

I was getting the PLC Simulator breaking down because I was entering an infinite loop, so the Cycle Time Too Long error was raising up. But know I corrected it.

On the PLC documentation side, CJP(510) jumps to the nearest JME(005) when its condition is ON and not OFF, indeed, on the opposite side, JMP(004) and CJPN(511), which are basically the same instruction, jump to the nearest JME(005) when their condition is OFF.
I also checked it using the debugger and executing each instruction singularly and CJP(510) jumps when the condition is ON and NOT OFF.

Hope this helps to somebody, thank you anyhow for your help.

LP
 

Similar Topics

Hi There, I have couple of Omron PLCs connected on my kepserverex and my intouch reads data from kepserverex. I have been observing that roughly...
Replies
4
Views
136
I am working on a project using a NB screen and NX1P2 PLC. I am having a really hard time getting a real number to properly translate through to...
Replies
3
Views
121
Our plant manger/my boss wants each line to display the takt time above the line. I am trying to research the cheapest way to do this. Our plant...
Replies
3
Views
188
I have PLC Omron CJ2M with OD211 module. I want to use the pulse output and PWM output and this module. But i confuse how to activated this, i...
Replies
0
Views
109
I have a project to control the speed of motor DC using PWM Output on PLC and when im on working i have a several trouble and of of them is the...
Replies
6
Views
217
Back
Top Bottom