basic programming with CNT or INC

Join Date
Feb 2007
Location
HB, CA
Posts
18
Hello All,

I am just trying to get my first ladder program to do anything...

I'm using an Omron CQM1 CPU21 w/ CxOne CxProgrammer 6.0

My first try is a simple counter which counts 10 seconds then resets itself. No point really, just seemed like a good starting place.

LD P_1s
LD CNT011
CNT 011 #10

However when I run this program in CxProgrammer, none of the values in the graphical CNT change and I never see CNT011 become true.

My next unrelated try was to increment a memory location every second.

LD P_1s
@INC(38) DM6

However, again the value in the graphical INC does not change, and neither does DM6 when viewed in the Omron Data Monitor Component.

I must really be missing something here...

any help would be appreciated

joe
 
I am glad you are using @ for the increment. If you do not the channel will increment on every fresh scan while ever the pulse is on.

I can honestly not understand why either of these rungs is not working for you unless the PLC is still in program mode and not monitor or run mode. I normally use monitor mode to allow online program changes.

Make sure the PLC is in monitor or run mode.
 
Hey, Monitor Mode!!!! That was easy!

But, why? Previously, I would edit my program, compile it, go online, then transfer the program to the PLC. From there, the ladder would illuminate and appear to run. However, the values would not update until I enabled monitor mode as suggested above. Guess I'll rtfm some more.

thanks for your help!
 
If you check in settings you will probably find it is set for "use programming console" on start up. This means if you have a cable plugged in when you turn the PLC on it will go into program mode. Set it up for monitor mode, download to the PLC and you will not have the problem again.
 

Similar Topics

Hello there, I'm practically new to the PLC world, I'm quite familiar with Siemens TIA Portal but I'm currently tasked to program Schneider PLCs...
Replies
5
Views
1,853
Hello, I am new to plc programming. I am trying to program a flow meter (E&H promag 50) in somachine basic to achieve the following: 1...
Replies
5
Views
2,393
Dear experts, I am want to program RS view32 with help of Microsoft visual basic (visual basic editor). But how to start I don't know,please...
Replies
10
Views
2,368
Hello all, i am planning to start basic plc and programming classes online if anybody is interested mail me
Replies
3
Views
1,396
HI Folks: I am new to PLCs, teaching my self with the Koldwater course, SLC-500. I am studying the Jump / TND and LBL commands. In writing a PLC...
Replies
10
Views
2,863
Back
Top Bottom