Factorytalk ME Write to Int

TigerCR1200

Lifetime Supporting Member
Join Date
Aug 2013
Location
Texas
Posts
12
I am trying to make a global object that will need to have a push button. When the button is pushed it will write a set value to the INT.

I can not find a way to connect to the INT and give it a value on touch. I know this is possible in SE. Is there a way to do this in ME?

I was using a maintained push button and giving the states a value that is written to the INT. This is not an option in a global object since you can't make the value of a maintained push button a parameter.
 
Brendan.buchan I wish I would have seen this before I just reworked it. Ill test it to confirm if it would have worked though.

What I did was created a BOOL array that can be used on momentary push buttons. I then run the BOOL through a FOR..DO loop to check for changes and exit out after the INT is set to the correct value.
 
On the Connections tab under value put your tag name followed by = x.

e.g. {[PLC]tagname} = 10


I just tried to do this, it is giving me an error when attempting to do this.

Problem writing value '0/1' to item '{[PLC]tagname} = 10'. So that method does not appear to work. This was using a maintained push button.
 
Never tried this, but does it have to be ==10 ??


I can't say for sure with Factorytalk View ME, but in most programming languages, == is for comparison and = is for assignment. Since he is attempting to assign the SINT 10 to a variable, my assumption would be that a single = would be the correct syntax.
 
I can't say for sure with Factorytalk View ME, but in most programming languages, == is for comparison and = is for assignment. Since he is attempting to assign the SINT 10 to a variable, my assumption would be that a single = would be the correct syntax.

Not sure either, but what you wrote makes sense.
 
In ME, use a pushbutton object and on the General tab for the button, set the Button Action to Value.
Then on the states tab, set the value for each state.
 
You can't write 10 to a BOOL.

The Interlocked push button will set a value to a tag.

You might also want to check out the Macro Button. It is located under Objects/ Advanced tab. The Marco Button also has a variable option. Click the Help button on the Macro Button property page for details.
 
I just tried to do this, it is giving me an error when attempting to do this.

Problem writing value '0/1' to item '{[PLC]tagname} = 10'. So that method does not appear to work. This was using a maintained push button.

Looks to me as though he was trying to write a bool with the '0/1' thing in his error message.
He did say he made a BOOL array.
 
Hmm I was sure I have used my solution before and it worked. Maybe I got something wrong, only did a quick check and posted that as I was leaving work for the week so carefactor was at its weakest.

I think Mike is onto it with setting the button action to 'value'.
 
Have a look here, if you can...

47307 - Creating Global Objects with Parameters in FactoryTalk View ME
Access Level: TechConnect

Regards,
George
 

Similar Topics

In FactoryTalk ME, is there a way to set a bit or write a value when someone presses a goto display? Or alternatively, have a momentary pushbutton...
Replies
15
Views
14,605
Hope somebody can help me here, I've done loads of FactoryTalk SCADA systems with no problems - this one is my first on Windows 10. I was having...
Replies
2
Views
2,374
I have a site that I have recently commissioned using View SE 8.0 connected to a CompactLogix 1769-L30ER. The customer has View SE ver 8.0, so...
Replies
7
Views
4,661
I was wondering if there was a faster way to read tags in VBA than myTestVariable = myTagGroup.Item("myTestTag").value ? Because I am trying to...
Replies
5
Views
3,313
from visual basic I am trying to write to a variable in factorytalk called alarm, this variable is of binary type, should not be a problem but I...
Replies
4
Views
4,046
Back
Top Bottom