Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Simple logic
PostPosted: Fri Apr 17, 2015 4:57 am 

Joined: Fri Apr 17, 2015 4:34 am
Posts: 2

Offline
Dear experts,

I am new in iX Developer and C# and I need to write a simple logic script like this:

IF Bit0 == 1 THEN
Bit1 = 1;
END_IF;

This is what I tried to do in iX, but in my understanding there is something missing, because IF statement doesn't execute.
Code:
    public partial class ScriptModule1
    {
      void Test()
      {
         if (Globals.Tags.BIT0.Value == 1)
            Globals.Tags.BIT1.Value = 1;
      }
    }


Would be very glad if someone could help.


 Profile  
 
 Post subject: Re: Simple logic
PostPosted: Wed Jun 10, 2015 3:07 pm 
User avatar

Joined: Wed Apr 09, 2014 3:16 pm
Posts: 36

Offline
Do you still need help with this?

What is the code that is calling the script module? Usually you have some kind of trigger (iX is event driven), so something like a button press or a tag value change and then you call the script module like this:

Globals.[name of script module].[name of method](any parameters);

_________________
Best Regards,

Kyle W. | Applications Engineer
Beijer Electronics, Inc.


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: