Jump to content

Recommended Posts

Posted

Hello,

I would like to make a graf bar like in siemens HMI's. I mean that the bar will fill up with the color and change for another color for higher values . It is possible to do it with SysMac Studio? Can anyone help me with this topic :)


Posted (edited)

thx it's help a lot

It's possible to connect value of color range with some variable? That we can set this value from HMI panel and changed for different items? I would like to do adjustable color range not fixed form Animations tab.

Edited by marcinmrag
Posted

In the Animations tab, use a variable of your choice (it's not fixed). In this example I used a tag called Level. The easiest way to test this is to create a new project, drag a Rectangle and a Slider to the screen. Set the Slider tag to 'Level' then simulate it. Maybe I don't understand your question. What is the application?

MrPLC_Animation.jpg.d7f07469c8bbeb7b0aba

Posted

I would like to set "StartValue" for the ColorRanges form other page. Use some edit data window put there for example 50 and change this in animations tab. Is possible to connect another variables just to change this value?

Posted
2 hours ago, marcinmrag said:

I would like to set "StartValue" for the ColorRanges form other page. Use some edit data window put there for example 50 and change this in animations tab. Is possible to connect another variables just to change this value?

Not currently possible for the color ranges to be tied to variables, only numeric values.

Posted

If anyone is interested.

You draw a bunch of lines on the screen

1 )  Define them as an array - In the example given, it is two-dimensional

#Region "Lines"

Public Lines( , ) As Omron.Hmi.ElementLibrary.Path = {  _
{
Line0,Line1, Line2, Line3, Line4, Line5, Line6, Line7, Line8, Line9, _
Line10, Line11, Line12, Line13, Line14, Line15, Line16, Line17, Line18, Line19, _
Line20, Line21, Line22, Line23, Line24, Line25, Line26, Line27, Line28, Line29, _
Line30, Line31, Line32, Line33, Line34, Line35, Line36, Line37, Line38, Line39, _
Line40, Line41, Line42, Line43, Line44, Line45, Line46, Line47, Line48, Line49 }, _
{
Line50, Line51, Line52, Line53, Line54, Line55, Line56, Line57, Line58, Line59, _
Line60, Line61, Line62, Line63, Line64, Line65, Line66, Line67, Line68, Line69, _
Line70, Line71, Line72, Line73, Line74, Line75, Line76, Line77, Line78, Line79, _
Line80, Line81, Line82, Line83, Line84, Line85, Line86, Line87, Line88, Line89, _
Line90, Line91, Line92, Line93, Line94, Line95, Line96, Line97, Line98, Line99 }, _
{
Line100, Line101, Line102, Line103, Line104, Line105, Line106, Line107, Line108, Line109, _
Line110, Line111, Line112, Line113, Line114, Line115, Line116, Line117, Line118, Line119, _
Line120, Line121, Line122, Line123, Line124, Line125, Line126, Line127, Line128, Line129, _
Line130, Line131, Line132, Line133, Line134, Line135, Line136, Line137, Line138, Line139, _
Line140, Line141, Line142, Line143, Line144, Line145, Line146, Line147, Line148, Line149 }, _
{
Line150, Line151, Line152, Line153, Line154, Line155, Line156, Line157, Line158, Line159, _
Line160, Line161, Line162, Line163, Line164, Line165, Line166, Line167, Line168, Line169, _
Line170, Line171, Line172, Line173, Line174, Line175, Line176, Line177, Line178, Line179, _
Line180, Line181, Line182, Line183, Line184, Line185, Line186, Line187, Line188, Line189, _
Line190, Line191, Line192, Line193, Line194, Line195, Line196, Line197, Line198, Line199 }, _
{
Line200, Line201, Line202, Line203, Line204, Line205, Line206, Line207, Line208, Line209, _
Line210, Line211, Line212, Line213, Line214, Line215, Line216, Line217, Line218, Line219, _
Line220, Line221, Line222, Line223, Line224, Line225, Line226, Line227, Line228, Line229, _
Line230, Line231, Line232, Line233, Line234, Line235, Line236, Line237, Line238, Line239, _
Line240, Line241, Line242, Line243, Line244, Line245, Line246, Line247, Line248, Line249 }, _
{
Line250, Line251, Line252, Line253, Line254, Line255, Line256, Line257, Line258, Line259, _
Line260, Line261, Line262, Line263, Line264, Line265, Line266, Line267, Line268, Line269, _
Line270, Line271, Line272, Line273, Line274, Line275, Line276, Line277, Line278, Line279, _
Line280, Line281, Line282, Line283, Line284, Line285, Line286, Line287, Line288, Line289, _
Line290, Line291, Line292, Line293, Line294, Line295, Line296, Line297, Line298, Line299 }, _
{
Line300, Line301, Line302, Line303, Line304, Line305, Line306, Line307, Line308, Line309, _
Line310, Line311, Line312, Line313, Line314, Line315, Line316, Line317, Line318, Line319, _
Line320, Line321, Line322, Line323, Line324, Line325, Line326, Line327, Line328, Line329, _
Line330, Line331, Line332, Line333, Line334, Line335, Line336, Line337, Line338, Line339, _
Line340, Line341, Line342, Line343, Line344, Line345, Line346, Line347, Line348, Line349 }}

    #End Region

2) You are writing a handler for line properties.

Sub Test_LineAll
    Dim n  As Short

'***************************************************************************************
' The loop of iterating over lines is a new option for passing in 1 time
'***************************************************************************************
If Draw Then
        Cnt_prohodov =0
        Draw = False
        NL = 0
End If        
If Cnt_prohodov < 2  Then 
    
            If NL < 6  Then
                NL = NL+1
            Else
                Cnt_prohodov = Cnt_prohodov +1
                NL = 0
            End If    
'***************************************************************************************

    
                     If   Line_Set(NL).IsVisible Then
                                  Line_Raschet1(NL) 'Let's pull the Full_Height value to the height of the Current window.

End If
                     
                For n = 0 To 49
                      n_Sub = n    
                      
                       If   Line_Set(NL).IsVisible Then 

                                
                                Line_Raschet2(NL)    'Let's call the procedure for calculating the segment parameters


                                Lines(NL,n).IsVisible = Line_Visible 'We will apply visibility to the line necessarily - after the calculation               

                                If Line_Visible Then
                                                    With     Lines(NL,n)
                                                        .Width = Line_Width
                                                        .Height = L_LineHeight
                                                        .left = Line_Left
                                                        .Top = Line_Top
                                                        .Rotate ( Point_Rotate_X , Point_Rotate_Y, Line_Rotate ) 
                                                        .StrokeThickness =  L_LineThickness
                                                        .Stroke = L_ColorLine
                                                    End With    
                                End If 

                    Else
                        Lines(NL,n).IsVisible = False     
                    End If 
                 Next n
                 
End If 

End Sub 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...