[Cimplicity] Expression function issues

michael90

Member
Join Date
Jan 2014
Location
Kuala Lumpur
Posts
16
Hey fellow seniors and experts, previously I had an issue of catering both signals from modbus and OPC (ethernet). My situation is like so; Currently existing panels communication means on Cimplicity are in modbus. Eventually, the existing panels will be replaced with new ones that will communicate via ethernet. So, in order to cater both of these signals, I created a set of new tags for OPC (eg: modbus="a" & OPC="a-OPC"). I am required to download all the tags at once and the replacing of the panels are not(each panels are replaced after 3 months sequentially). Yes, I've made the channel and device uniquely so that when I download the OPC tags in the workbench, they wouldn't download over the existing modbus tags. So, I managed to figured it out by fiddling around with visibility and expression functions, especially the "isavailable" (using cimplicity 8.2). Problem now, the existing workbench that will be displaying the graphical screens is in cimplicity 6.1 and I've check through it doesn't have this function "isavailable". Can anyone tell me is there a similar expression in ver 6.1 ("isavailable")? or anyone has a working sample script that can fulfill my situation here? Of course having a similar function "isavailable" in ver. 6.1 is more helpful, since I got it working. Your help is much appreciated.
 
Last edited:
It sounds like you are doing this on your .cim screens.

This may not help, but 6.1 had a similar item for scripts.
Point.QualityIs_Available.

In your help files, look under "Basic Control Engine/Scripting", then "Basic Control Engine Language Reference", then "CIMPLICITY Extensions to Basic".

Maybe you can change from the Expression Editor to a script in the screen?
 
Another option is to use an Availability trigger on your point.

Open your point properties and be sure the properties view is on advanced.

Basically, the Availability trigger determines if your point is valid.
 
@dYoast, I tried the availability trigger method on workbench (device tags), but they dont seem to work too. I've tried many methods and yet i cant succeed in this. Could you give me your email so that I can send you pictures to be more detailed of what I'm trying to explain here. I am overlapping images/text and making them invisible when there is no signal coming from it.

Situation 1 (ver 6.1, analog)~ I have set the tags separately, eg: a (modbus) & a-opc (OPC). Each of these tags are tagged to their own respective "availability trigger" ( Testing1.Modbus.A_data1 & Testing2.OPC.A_data2). On the object (modbus & OPC ,each), its variable is connected to 'a'/'a_opc'. I got the text (analog value) to disappear by simply doing this on the modbus text : i) properties/text/expression/'a'/display format/real(proper data type) ii)properties/colour animation/expression count/edit/expression/'a_opc'/ticked on the text/ left it blank(mimic no signal, and this was done also for OPC tag, vice versa). This worked. Please help me with situation 2

Situation 2 (ver 6.1, digital)~the object has a variable "CA" linked to a tag 'b'(value). I made the condition that if the signal from modbus is present, it would change the text's solid fill red in colour. I tried using : colour animation/visibility/expression/not 'b_opc' to counter react the absence/presence the opc's tag. Apparently, this did not work, instead, it popped out as a black object, which indicates the tag of the object is no longer communicating. I did this to vice versa for 'b_opc'.

In version 8.2, I could utilize this expression "isavailable" and settle all this once and for all, and it worked. Problem now is that my work needs to be done on 6.1 platform instead. I've tried so many times and its never ending. Mind to help a miserable person in need? Please, someone who is well versed with Cimplicity.
 
I am no Cimplicity expert. For more help, use the links RussB posted.

I no longer have 6.1 available for use. We have upgraded to 8.2.

Your situation 2 makes sense. You tried to use a tag that is not communicating, so the text ends up black.

If your visibility point is boolean, you could try an expression that checks to see if the value is either 1 or 0. If it is neither, do nothing.
There is an IF expression available, but it is not well documented.

You might look into using a Linked Container.

You can use the em_init.bcl script to possibly set an extra bit. em_init runs when the project starts.
The thought here is to have a bit you use for your visibility.
In the script, check your b_opc tag to see if it is available. You can use the .QualityIs_Available property.
If it is available, set your new bit high. If not set it low.

Code:
Dim MyVisiblePoint As NewPoint:  MyVisiblePoint.Id = "MyPointName"
If b_opc.QualityIs_Available = TRUE Then
    MyVisiblePoint.SetValue = 1
Else
    MyVisiblePoint.SetValue = 0
End If
 
I still can not find it in the help system, but I think for an IF statement in the screens expression editor you use the IIf function.

IIf(condition, TrueExpression, FalseExpression)
 
I did just find this in the help system.

Points have quality attributes.
PointID.Quality.Is_Available will give a value of 1 if the point is available or 0 if it is not.

That may give you the same functionality as the IsAvailable.
 

Similar Topics

Hello, I am working with cimplicity workbench, I have made changes to the current project from this machine I am using in the past. However when...
Replies
0
Views
51
I am currently working on a project involving Cimplicity 10, which consists of a setup with two redundant servers and five operator workstations...
Replies
0
Views
42
The project on the operator workstation keeps disconnecting, even though I have an installation server and operating station set up through...
Replies
0
Views
55
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
11
Views
257
Hello everyone! This is my first time posting, though I have been to this site a few times hunting for some random problem like we all do. I...
Replies
4
Views
215
Back
Top Bottom