Home AMX User Forum AMXForums Archive Threads AMX Hardware

Using Web Control

Greetings,

Could someone please give me a quick run-down on, or point me to, a guide for using web control.

I have an NI-2000 master that I would like to serve a G3 panel design from.

Thank you!

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    Hi TurnipTruck,

    If you are just using a web panel and nothing else then you would use something like this for your code:
    DEFINE_DEVICE
    
    dvWebTP = 10128:1:0 // = to base address for html conversion
    
    DEFINE_EVENT
    
    BUTTON_EVENT[dvWebTP,1] {
    
       PUSH: {
          //do whatever
       }
    }
    

    If you want to have a combo of web panels and real panels then you would use something like this:
    DEFINE_DEVICE
    
    dvTP		= 128:1:0
    dvWebTP 	= 10128:1:0 // = to base address for html conversion
    vdvTP		= 33001:1:0 //virtual device
    
    DEFINE_COMBINE (vdvTP,dvTP,dvWebTP)
    
    DEFINE_EVENT
    
    BUTTON_EVENT[vdvTP,1] {
    
       PUSH: {
          //do whatever
       }
    }
    

    Here's how you create the web panel files:

    1) Open up your G3 touch panel file in TPDesign 3.

    2) Select File ---> Save as HTML

    3) The HTML Conversion Options dialog box will open. For this example, enter 10128 as the Base Address: I believe the rest of the default values will suffice. I've attached an image which shows the dialog box entries filled out.

    4) Press the Convert button.

    5) When the conversion is done press the FTP Transfer button and the FTP Transfer dialog box will open.

    6) Fill out the entries for the IP of your Master, username and password. The attached image also shows this dialog box filled out.

    7) Press the Begin button. When the transfer is complete you can close the dialog box and you're done.

    To view your web panel in action, open a browser and http on over to the IP of your Master and you will see a link under the Web Control tab that has your project name. Click on that link and your web panel will come to life.

    That's it for the basics. There are other options to embed your web panel in custom web pages and other stuff but hopefully this should get you up and going.

    Cheers,
    Joe
  • TurnipTruckTurnipTruck Posts: 1,485
    You are the man! Thank you very much for taking the time to write out such a detailed reply. Working like a champ!!

    Thanks again!
Sign In or Register to comment.