Omron/CX-Programmer User Defined Function? (Not Function Block)

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
781
Is it possible to create User Defined Functions in CX-Programmer? You can do this in CODESYS no problem.

I would like to be able to do this, and have the function return a bool

Code:
IF (PairMatcher(Left_ID, Right_ID, 1, 2)) THEN (* Test of pair Matcher*)
    SequenceNumber := 1;
END_IF;
This is the code that would be in the Function

Code:
[B]IF((InA = CompA AND InB = CompB) OR (InA = CompB AND InB = CompA)) THEN
    PairMatcher := True;
ELSE
    PairMatcher := False;
END_IF;[/B]
 
Last edited:
I don't think CX-Programmer has a User Defined Function. It only has subroutine and Function Block.(If I am not wrong only CJ series PLC has Function Blocks).
 
I don't think CX-Programmer has a User Defined Function. It only has subroutine and Function Block.(If I am not wrong only CJ series PLC has Function Blocks).
Thank you sir.

Sorry I should have replied along time ago. I read it though.

Out of Curiosity does SYSMAC Studio support this?

P.S. CX-One sucks why can't they just migrate to Codesys.
 

Similar Topics

Hello ! I am trying to use an omron cj2m-cpu33 with a CP1W-CIF01 plug in serial connector to talk to a zebra ZT610 printer. I am getting the data...
Replies
8
Views
317
I am using a function block that has a in/out parameter that is a structure. The structure has an array as one of the elements. I can index the...
Replies
1
Views
708
Is there a way in CX-Programmer to call Ladder Instructions from a structured text program? I can see several functions in the autocomplete...
Replies
3
Views
1,852
Is there a way in CX-Programmer to call functions from a structured text program? I have found this manual that seems to describe the process...
Replies
1
Views
1,006
Is there a way in CX-Programmer to initialise an array? Set all values to zero or false depending on the data type Solutions in Ladder and...
Replies
2
Views
1,225
Back
Top Bottom