Module.Upload(String) Method

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Module.Upload(String) Method

BR.AN.PviServices .NET


Upload the Module from the plc

[Visual Basic]

Public Overridable Overloads Sub Upload( _

  ByVal fName As String _

)

[C#]

public virtual void Upload(

  string fName

);

Parameters

fName

An absolute path for the BR module.

Example

// Creating new module object
Module mod = new Module(cpuObj,"sysconf");
mod.Connect();
mod.Connected +=PviEventHandler(Module_Connected);
...
...
private void Module_Connected(object sender, PviEventArgs e)
{
    Module tmpMod = (Module)sender;
    tmpMod.Upload("c:\\sysconf.br");
    // Adding eventhandler for upload progress
    tmpMod.UploadProgress+=new ModuleEventHandler(mod_UploadProgress);
}
...
...
private void mod_DownloadProgress(object sender, ModuleEventArgs e)
{
    // Setting value property of a progressbar
    this.pgModuleUpload.Value = e.Percentage;
    if ( e.Percentage % 5 == 0 )
        this.lbPercent.Text = e.Percentage.ToString() + "%";
}

See Also

Module Class | BR.AN.PviServices Namespace | Module.Upload Overload List


Generated from assembly BR.AN.PviServices [8.1.0.4]