Map code

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #11676
    dannytan
    Participant

    I have 2 questions regarding the map.

    I have already put my input from my modbus (decimal) into 101 channel.

    Now i would like to show

    Status : Normal if 1; Fire 1 if 2 ; Fire 2 if 3

    How can i write this function inside the map

    Second questions,

    I would like to put my map’s pin became green if Normal (1) and Red (if not 1)

    Thanks

    • This topic was modified 1 week, 2 days ago by dannytan.
    #11678
    dannytan
    Participant

    I make a new unit called State (ID 38) Normal;Fire1;Fire2
    No matter what decimal i got from the input (0,1 or 2); the state stucked on Normal state.

    Thanks

    #11679
    dannytan
    Participant

    Hi again,

    The first question settled ; i have changed input into enum text, everything is fine now. Can you help me with the color state of the pin on the map plugin ?

    Thanks

    #11682
    Mikhail
    Moderator

    Hi,

    According to the manual: “0 – channel not specified; positive channel value means the location is normal, otherwise the location needs attention”.
    So channel formula might be: Cnl <= 1 ? 1 : -1

    #11683
    Mikhail
    Moderator

    Probably, you should create a new channel of the calculated type with the formula
    Val(101) <= 1 ? 1 : -1; Stat(101)
    where 101 is the source channel number

    #11686
    dannytan
    Participant

    Hi Mikhail,

    Thanks for your promp reply. I checked .map file. But it doesnt specify on how to associate my chanel input into the pin on the map.
    I would like my 101 input to be associate with the map pin and show let say green on 0 and red on 1 . How am i supposed to do it?
    https://wetransfer.com/downloads/b6a93d6b165f9e061f15618f6bbb84b320221125092743/94674ccc32b4f7537b413c7a48d12e3520221125092803/98331d

    #11687
    Mikhail
    Moderator

    Hi,
    Unfortunately, wetransfer.com does not work in Russia, so I can’t check the file.
    Please upload the file to another file hosting.

    #11689
    dannytan
    Participant

    Hi Mikhail,

    I know the problem now, it is on <StatusCnlNum>, problem is that if my decimal input = 0 ; My map pin turns green and if it is positive ; my pin turns grey

    How to turn the map pin to green if >0 and turns red if 0

    Secondly,

    For the link details as for now <link viewID = “2”/>
    How to change this link into my power BI link? let say “https://powerbi.com&#8221;

    Thanks

    #11690
    dannytan
    Participant

    Hi Mikhail,

    Sorry again, i have found the solution by simply copy paste the website link into the interface and it works.

    Now , my question will be
    “problem is that if my decimal input = 0 ; My map pin turns green and if it is positive ; my pin turns grey

    How to turn the map pin to green if >0 and turns red if 0”

    Thanks

    #11691
    Mikhail
    Moderator

    Hi,

    How to turn the map pin to green if >0 and turns red if 0”

    Use a channel formula mentioned above or similar.

    #11693
    dannytan
    Participant

    Hi Mikhail,

    Yeah i understand, problem is that what is the input so that the pin is red? or grey or blue?

    Thanks

    #11696
    Mikhail
    Moderator

    Hi,

    what is the input so that the pin is red?

    It should be a channel that displays location status. For example, some tag of a device mounted on the site.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.