Help - Search - Members - Calendar
Full Version: Macro execution and the FINS instruction
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Designer
ParaffinPower
Hello
I have a macro with a FINS instruction in it.

If I execute from a PB then the FINS instruction works perfectly.

BUT!!! If I execute the same macro from a "When value changed" (See dialog), the Macro runs, but the FINS instruction is not executed. What am I missing???
IPB Image

Have a good weekend everyone
BITS N BYTES
Is your the macro that uses "When a value changed" as the trigger a Multifunction Object on one of your screens screen or A Global Macro?

Are you sure that trigger address changes value and retains the new value long enough for the macro to run?

I had a similar problem [my own mistake] where the trigger address from the PLC changed values too fast for my macro to run correctly.

My 2,000,000,000 Zimbabwe Dollars 2 Cents.


ParaffinPower
Hi BnB
This dialog is from a Numeral display object. The value changing is the value the numeral display edits.

I've put a $B789=1 after the FINS instruction, and this is happening.

Oddly enough, I tried creating a project macro with 'value changed' as the trigger, and it didn't run at all. That's a seperate issue, though.

Pp
BITS N BYTES
I fail to see what adding $B789=1 at the end of the FINS command has anything to do with your problem?

I guess you could use this to check whether the FINS macro was actually called from the changing value of the Numeric object.

You might try using "When a bit changed" vs. "When a value changed".
Add a macro within the Numeric object that sets the bit = 1 if its value changes.
Reset the same bit, bit=0 at completion of the FINS command.

STUMPED!!

ParaffinPower
QUOTE(BITS N BYTES @ Feb 14 2009, 08:22 PM) [snapback]78880[/snapback]

I fail to see what adding $B789=1 at the end of the FINS command has anything to do with your problem?

I guess you could use this to check whether the FINS macro was actually called from the changing value of the Numeric object.

You might try using "When a bit changed" vs. "When a value changed".
Add a macro within the Numeric object that sets the bit = 1 if its value changes.
Reset the same bit, bit=0 at completion of the FINS command.

STUMPED!!

$B789 was just an example. Just to satisfy myself that the macro was indeed running. Thanks for giving it some thought - I'll try the bit changed idea, or just put a PB next to the numeral input box to run the FINS macro.
Pp
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.