AdvancedHMI Software

General Category => Open Discussion => Topic started by: mach62468 on January 11, 2018, 01:38:02 PM

Title: Outputs
Post by: mach62468 on January 11, 2018, 01:38:02 PM
I am currently trying to use some of the switchs and buttons to control bits on a controlLogix. I can read values but I am unable to write.Any help would be greatly appreciated.
Title: Re: Outputs
Post by: Archie on January 11, 2018, 01:51:38 PM
Create Controller scope tag named MyButton of type BOOL
In AdvancedHMI add a BasicButton to the form
Set PLCAddressClick to MyButton


Create a controller scope tag named MyDint of type DINT
In AdvancedHMI, add a BasicLabel to the form
Set PLCAddressValue to MyDint
Set PLCAddressKeypad to MyDint

Run the application and click on either item
Title: Re: Outputs
Post by: mach62468 on January 11, 2018, 02:26:43 PM
I believe that is what I have done but does not work. See photo below.
Title: Re: Outputs
Post by: Archie on January 11, 2018, 03:03:49 PM
Set the OutputType of your button to Toggle so you can see it better in RSLogix
Title: Re: Outputs
Post by: mach62468 on January 12, 2018, 09:25:34 AM
Ok so it works as long as I dont run my code. How would I set the value of the bit by using code instead of a button?
Title: Re: Outputs
Post by: Archie on January 12, 2018, 09:56:11 AM
EthernetIPforCLXCom1.Write("MyTag", "1")
Title: Re: Outputs
Post by: mach62468 on January 12, 2018, 10:50:53 AM
Thanks alot! Is there somewhere I can find source code like this?
Title: Re: Outputs
Post by: Godra on January 12, 2018, 11:18:01 AM
Out of curiosity, what events did you want to trigger these writes?