Sign in to follow this  
Followers 0
mmagnani711

Function Block for Software Cam

7 posts in this topic

Hi all. I'm actually looking on web about some Function Block FB OMRON, that could realize a Software Cam (someone calls it "Machine Phase", "Switch Cam",...), a software object that set to on its output state when an Axis position is equal to a given ref.value. The output then stay on for a duration value (in time or degrees unit). I'm using this kind of object on ELAU controllers, where there is a wonderful object called "SwitchCAM" that manage this process including the degrees/time duration. Does anyone know the existence of something similar for OMRON Systems (programming on CX-Programmer). Thanks all, bye. Mirko.

Share this post


Link to post
Share on other sites
The easiest way to do this is to use the Block Compare Instruction. Each instruction can handle 16 areas (Low limit-High limit), but if you need more you just add more BCMP-instructions. The source (Input) could be an angle from an encoder, timer value or any analog value you like. BR

Share this post


Link to post
Share on other sites
I think what mmagnani711 mentioned has to be a cam positioner in software mode. Block Compare might not do the job. Imagine if a task will commence say at 303 degree and End at 3 degree. How do you compare ? As the Angle will end at 359 and then start from 0 again. So how do you perform the comparison ?

Share this post


Link to post
Share on other sites
BCMP2 in CP1H can handle [low limit] > [high limit] for ranges and supports up to 256 ranges. However, I personally do not use it for the mentioned purpose because of the following: 1. It is less obvious for program reader (which may be yourself after certain time). 2. Parameters are not visualized when the instruction is being monitored- it is necessary to find their origin in the program to monitor them. 3. Parameters used are 16-bit, hence if a parameter is a result of * or / it must be calculated to temporary register then moved to the BCMP parameters area. 4. BCMP2 takes long execution time, comparable with individual detection of all the ranges. Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
In that specfic case could have a compare from 303-359 and another 0-3 and OR the output results to fire another work output... yes... not neat but hey... quite achievable none the less.... this could even be coded quite easily in fact in that you caould have two ranges assigned for each CAM output and then compare the CAM firing posistions against each other..etc

Share this post


Link to post
Share on other sites
http://forums.mrplc.com/index.php?showtopic=6062&hl= shows the fun I had setting up compare tables. look at the last bit of code to see how it finaly worked. You should be able to connect your encoder to a high speed counter and then manipulate the positions you require and stick the positions into a compare table. The tables then fire off interupts where you can set flags that call timers up or just use another position to turn off your 'cam in position' flags. In effect with a bit of data crunching you have a limitless 'soft cam' available (as once a position has been passed you can recrunch and set new targets).

Share this post


Link to post
Share on other sites
The SwitchCAM function you mention belongs to ELAU's Motion Library. At this moment CJ1 has PLCOpen 1.0 Motion Library (for the NCF), ELAU's SwitchCAM is nor part of this library. My recomendation, (today) for Flexible Motion Control is to use Trajexia based systems.

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