EBpro macro

Nafir

Member
Join Date
Feb 2024
Location
Stara Zagora
Posts
8
Hello, I'm new to a program EBpro and I have to find a way to make a numeric object's background change colors depending on read data from plc. For example, I'm gonna have a HHigh, High, LLow and Low limit. If the data hits
High or Low the background has to change to yellow color, if it hits HHigh or LLow - red. The panel is MT8150XE model and apparently I don't have the Object Condition menu. I'm trying to write a macro. So far I can activate a BitLamp which has 2 states, but can't find a way to make it stop blinking. Is there even a way to make an object or shape reset it's state? Is it even possible to do this via macro? There is a way to do this without it - I just put shapes or objects behind the numeric object and address them properly but still, was wondering if I can achieve this in other ways.
 
Hello,
Okay but, how do I set up the the whole thing? I'm very confused. Would appreciate your help :) To be honest, I came up with an idea. I will try putting 2 rectangles and will enable use register status/value for both. But once I call the address with a macro (for example LB 0, "SetData(On, "Local HMI", LB, 0, 1)"), how do I make it disappear ? Because once shown, it will hide the other one. One more thing - how does SETBITOFF work? I've read the manuals but can't really understand what is happening... Sorry for asking too many questions, but I think SETBITOFF is the salvation, since both rectangles use register and If I turn off the bit they will disappear till the next turn on of the bit.
 
Hello guys,
So far I came up with a solution. I use two variables - On and Off, bool type. Firstly, I use GetData, to read data from numeric object and convert it to BCD - "LW_BCD". Then, depending on the read data (Input), I set on and off ellipse objects, which have enabled "Use register status/value". Whenever I set on one of them using SetData(On) (since On is TRUE), in the end of "If" I use SetData(Off) (since Off is FALSE), so I can turn off (hide) them. Important note is that I had to set correct device data format in numeric's properties (in my testing case 32-bit Float). I'll put my test macro below, would appreciate any tips.
 

Attachments

  • macroChangeColors.png
    macroChangeColors.png
    38.2 KB · Views: 5

Similar Topics

Hello, I am trying to configure my recipe database. I need to be able to save a recipe by which buttons on a screen are active up to 60...
Replies
2
Views
1,121
Hi all, I wanted a 3rd party HMI that could use faceplates and indirect addressing. And I found it! I use RSLogix 5000 and Omron Sysmac. I...
Replies
0
Views
4,277
Hello everyone, this is my first post. FactoryTalk View SE v.13 I have a macro defined in my project that I would like to call up when someone...
Replies
0
Views
304
Hello Guys, I have been trying to study a Machine that have Omron 3g3mv VFDs that is controlled by CJ1m CPU and SCU41-V1 communication card. The...
Replies
0
Views
478
Hello Guys, I have a packaging machine in the company that I work for that have 8 Omron VFDs (3G3MV ) that are controlled via Modbus with CJ1M...
Replies
1
Views
643
Back
Top Bottom