Counting with trigger input of ACOPOS

Hi the community,

I work with AS6.7.1.5 and MappMotion6.8.1. I would like to use the trigger input of an ACOPOS for counting. The sensor detects a mark (at max speed <1ms) and I use the value of the counter in the PLC program (10ms cyclic task). I am not using registration The counter operates only in up direction. Resetting the counter is not required.

While checking the help documentation, I saw that I can count the rising edges of the TRIGGER1 signal using an SPT program. I am not very familiar with SPT programming. Has anyone used the TRIGGER1 input for counting? Could you help me?

Jean-Philippe

Any motion experts who can help here?

Hi @Jean_Philippe_Daniel ,
if you are not familiar with SPT, I don’t see a problem, we have an helpful training module TM471 - ACOPOS Function blocks
In the section 7.2.2 COUNT - Counter, there is an interesting exercise ‘Measurement of the duration of a trigger signal level (self-paced)’

I didn’t use ACOPOS trigger signal for counting, but I don’t see a problem for that application.

Ciao
Valerio

Hi,

just want to post the documentation for this ‘ACOPOS function block’:

COUNT - Counter

ACOPOS function blocks - How To

Hi guys,

Thank you very much for your help.

I am going to test a simple SPT program, with a cyclic read of parID 13880. Please let me know if you have any comments.

As soon as I have the necessary equipment to carry out the tests, I will get back to you with the results.

See you soon.

Jean-Philippe

HI @Jean_Philippe_Daniel ,
theoretically for now you can replace the ParID STAT_TRIGGER1 with VAR_UI1_0+0, create a cyclic write channel for updating VAR_UI1_0+0 with one with your variable in your task.
When you do that you can practice a little bit on tracing ParID with mapp Cockpit and doucle check all COUNT functionality.

Just an idea
Ciao
Valerio

Hi,

Thanks Valerio for your tip.

I have a solution that works in simulation. With MappCockpit, I am forcing the TRIGGER1 input and on the rising edge, the counter increments. The value of “Counter” changes in PLC program. Next step, testing with the equipment.

The SPT chart (see below) is a channel feature of Channel #1 of an ACOPOS P3

The ST program (see below) is executed in 100ms.

Regards

Jean-Philippe

I marked your final reply as a solution.

Hi Jaroslav,

I was wondering if if I should mark my last post as the solution that I was waiting to conduct tests using actual hardware.

You are right to mark as solution my final reply. I will append my post as soon as I have the equipment.

Thanks.

Jean-Philippe

Solution mark can be changed. So if you get an answer that moves you forward and you know you need time to test it, it’s good to mark that reply. This way, you give everyone the signal that this topic no longer needs to be resolved. I’m always happy when the author comes back and either confirms that they found the solution or removes the solution and continues the discussion.