in
Creating Smarter Networks

Creating Config Pages Like Analog Functional Blocks

Last post 07-08-2008 1:33 AM by JasonC. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-07-2008 5:42 AM

    • JasonC
    • Top 25 Contributor
    • Joined on 06-13-2008
    • Posts 5
    • Points 85

    Creating Config Pages Like Analog Functional Blocks

    Hi,

    Does anyone have any advice or examples on creating pages with configuration options for binding outputs, entering constants for comparsions, etc like used on the configuration pages for the Analog Function Blocks? Contribute/Vision only seems to provide controls for reporting, or writing to a data points.

     

    Thanks,

    Jason

    • Post Points: 20
  • 07-07-2008 7:30 AM In reply to

    • dapper
    • Top 10 Contributor
    • Joined on 03-25-2008
    • NY
    • Posts 10
    • Points 140

    Re: Creating Config Pages Like Analog Functional Blocks

     Not real sure what you mean by 'binding outputs'.  That is generally a task done with n LNS network management tool.  I don't think it can be done through a web page. 

    Comparing constants on the other hand is easily done with Javascript added to the html of the web page created in Vision.  After creating the page in Vision Javascript functions can be added to perform a wide variety of computations of the data but the basic rules have to be adhered to.

    • Post Points: 20
  • 07-07-2008 9:37 AM In reply to

    • JasonC
    • Top 25 Contributor
    • Joined on 06-13-2008
    • Posts 5
    • Points 85

    Re: Creating Config Pages Like Analog Functional Blocks

     My server is in stand-alone mode, and the configuration page would be for an FPM. I would like to have a page similar to the Analog Block config page, which allows you to select your inputs, the location of the output (such as a switch, one of the digital outputs, or another dp somewhere).

     In the image here of the config page, the output can be clicked, and a target selected. The logic options provided by the afb are a little lacking for me, and I intend to write my own c++ code, and have something similar to the output section below to send the output somewhere.

    This is the kind of thing i'm looking for. Hope that helps clarify.


    • Post Points: 20
  • 07-07-2008 11:01 AM In reply to

    • jster23
    • Top 10 Contributor
    • Joined on 04-03-2008
    • Posts 17
    • Points 235

    Re: Creating Config Pages Like Analog Functional Blocks

    Jason,

    Your scenario seems very doable with an FPM.  First off, you can use Web connections to bind DPs on external devices to the internal DPs in an FPM when running the SmartServer in Standalone mode.  You can set up all the logical functions in your source code, maybe using an enumerated DP that contains values corresponding to the desired function so that if x == Average, then the code that calculates the average of the input DPs is run.

    The part that seems challenging would be setting up an FPM Config Web page in which the user selects the input and output DPs.  The FPM Config Web requires selected DPs, which have a specific defined programmatic type.  I don't believe you can get the kind of flexibility provided by the built-in AFB Web page where you can dynamically specify the DP types to be evaluated.  Maybe there's a way with JavaScript?  I welcome comments and feedback on this point.

    Off the top of my head, I would create let's say 10 input DPs of a specific type in my FPM, and then create Web connections between x to 10 compatible external device DPs and the FPM input DPs.  Your FPM code could then perform the algorithim corresponding with the selected function and store a value in an ouptut DP. You could then use a Web connection between the FPM output DP and one or more compatible external device DPs.   

    Jonathan
    Technical Writer, Echelon
    • Post Points: 20
  • 07-08-2008 1:33 AM In reply to

    • JasonC
    • Top 25 Contributor
    • Joined on 06-13-2008
    • Posts 5
    • Points 85

    Re: Creating Config Pages Like Analog Functional Blocks

    Thanks for the reply. The inputs do not need to be user selectable. The FPM will be taking care of those. The config page might display them alright (which fine to do) and all the types of input and output are known before hand.

    I can achieve the same result by having the FPM store the output (which is a boolean) as an output dp, and then add a binding to another dp somewhere else, FB, FPM etc using the normal way.However, isn't isn't as friendly as I would like. I would like the binding to be done from the FPM config page.

    I've scanned though the programmers preference again, and it should be possible to create a web connection via a soap call. Perhaps I can see if I can write some javascript to allow the user to select the target point, and create the binding using a soap call from javascript.

    Thanks for the advice guys.

    • Post Points: 5
Page 1 of 1 (5 items)
©2008 Echelon Corporation