converting DM to bit from OMRON CPM2A

recycled_mind

Member
Join Date
May 2007
Location
Cebu, Philippines
Posts
118
guys,

Please help. Ive been having a self study on PLC Programming , I use OMRON CPM2A. I want to program the high speed input from my incremental encoder. Please help how to make some ladder program in order to monitor the pulse generated from my encoder to PLC. I want to set bit 10.00 to ON once the PV has reach example to 100 pulse.
 
Assuming that D1 is the PV, then

LD P_On
CMP(020) D1 #100
LD P_EQ
OR P_GT
ANDLD
OUT 10.00

You will also need to reset the counter once it reaches your required max value. You will need to read the manual for that...
 
You need to evaluate the high speed counter present value.
The code you are working with is only comparing the value of DM1 to a constant value of 100.
The high speed counter present value is in channel 248 and 249.
If you set up a MOV instruction before the above listed code, it should work.

LD 253.13
MOV 248 DM1

Let us know how that works.
 
Do you have the encoder setup correctly and working? Do you see the Destination word that you have chosen incrementing?

Section 2-2 in this manual gives a very detailed explanation of how to set everything up including examples.
 
If you post your code, it may help. Also, RTM, these help a lot.


I used PRV(62) and CMP(20) instructions.

I don't think you need the PRV instruction, use the address's
specified by gtsupport, and the link provided by IO Rack


Finally, I have to ask, is the PLC in run mode?
 

Similar Topics

Well I am trying to cleanly convert a decimal value in a DINT to the corresponding bit in a different DINT So if I have the number 11 on in...
Replies
11
Views
1,988
I'm converting a program in FTView Studio from 32bit to 64bit program because the tech wanted some runtime securities for screens changed. I'm...
Replies
0
Views
1,464
I am having problems expressing an ANALOG OUTPUT 16bit INT word (0-10V Proportional Valve Voltage) as a REAL decimal number. From my...
Replies
6
Views
9,178
Hello All, I'm curious if anyone has discovered a method of emulating 32 bit in a 64 bit os for the conversion of a .apa. Its very much an...
Replies
1
Views
2,499
I've finally gotten around to programming an AD Click PLC that's been sitting in my office for close to two years. The main reason I'm using it is...
Replies
3
Views
4,664
Back
Top Bottom