Sign in to follow this  
Followers 0
axledeep

HSC C235 and its assigned D memory

4 posts in this topic

First timer on MrPLC. Great site! Thanks all. Inherited Shihlin PLC AX0n. Bought GX Developer to upload ladder. Planning on converting the ladder to Omron. I ran into an obstacle. HSC C235 is being used to count speed by measuring peak phase currents of one phase using hall sensor (i think anyways). No matter. C235 is declared at the beginning of the ladder. M8000 ------- (C235 D5) The next rung starts one of these STL thingys. Seems to be a small subroutine that is executed whenever S61 is true. -------[sTL S61] Within the STL is a series of D words being manipulated...and that are related to C235. M8000--------[MOV K93 D5] "and yes, it is MOV, not DMOV" M0-----------[DMOV C235 D30] M24----------[DMOV D5 C235] Q. Why is C235 being used to move data when D5/D6 would also work? And why is D5/D6 being moved to C235 when it is literally the same words? Am I missing something here? I would just like to convert the above lines into something like this (Omron CPM1A ladder....eeek!...laying around in parts room syndrome) always on--------PRV 0 0 DM5 "HSC declaration, input 00" STEP routine starts here always on--------MOV #00 and #93 to DM6 and DM5 respectively IR200.00-------------XFER #2, DM5 DM30 "block transfer, 2 words" IR202.04-------------but here I get stumped? why should I follow the programmer's ladder and move DM5 to the HS counter, when it is already there? I know that this is not alot of information but....it's kinda hard to give the whole picture. Any insight would greatly be appreciated. Regards,

Share this post


Link to post
Share on other sites
hi axledeep and welcome to forum you are confusing A=CURRENT_COUNT and B=COUNTER_PRESET. first one (A) changes value every time counter is triggered. second one (B) normally stays the same during one part of the process. once the A=B, counter complete bit is set (you can reset it). i didn't try it but probably writing preset into current count causes counter to complete. using MOV to set value of D5 is likely to be a mistake (unless this is intentional and somewhere else in program D6 is set to some value too).

Share this post


Link to post
Share on other sites
D5 in the example is the counter set value. On reaching this value the counter contact activates. Unlike regular counter, high-speed one continues counting after reaching the set value. C235 is the counter present value. Both are 32-bit. D6 is a non-latching register and being such will be set 0 on PLC start. Also, be aware that K93 in the Mitsubishi program is a decimal constant, while the #93 in the OMRON is hexadecimal (not equal to decimal 93). Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
Good grief, I feel like a noob...actually, I am :p I didn't get much help from the programming manual especially in the area of preset and actual...but I knew you guys would be able to straighten me out. Thanks much! Axle

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0