sequence collapse


luarken

Recommended Posts

why at the end of my sequence it truncates the Daqfactory

windows says does not respond.

thanks

// setup FTP

FTP.strServer = "ftp.x.com"

FTP.strUserName = "x"

FTP.strPassword = "x"

while(1)

delay(300) // wait 600 seconds

page.Capture("Home_Page","C:\instrument\images\home.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\home.jpg"

FTP.strRemoteFile = "images\home.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento1","C:\instrument\images\1.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\1.jpg"

FTP.strRemoteFile = "images\1.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento11","C:\instrument\images\11.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\11.jpg"

FTP.strRemoteFile = "images\11.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento2","C:\instrument\images\2.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\2.jpg"

FTP.strRemoteFile = "images\2.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento22","C:\instrument\images\22.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\22.jpg"

FTP.strRemoteFile = "images\22.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento3","C:\instrument\images\3.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\3.jpg"

FTP.strRemoteFile = "images\3.jpg"

FTP.Upload()

delay(40)

page.Capture("Instrumento33","C:\instrument\images\33.jpg")

delay(5)

FTP.strLocalFile = "C:\instrument\images\33.jpg"

FTP.strRemoteFile = "images\33.jpg"

FTP.Upload()

delay(40)

endwhile

Link to comment
Share on other sites

the peculiar thing is that the application, yes loads the images that it captures to the web page and I can to see graphs and pages of my application while sequence realises for the first time, but, if I want to see the graphs and pages of the application when the sequence initiates the second or third ,4,5,6 .....time , I cannot, because the screen of Daqfactory goes totally white and it says that it does not respond.

the application works of wonder without this sequence, but I need that this works well.

thanks!!!!

Link to comment
Share on other sites

You might try adding some debugging code of some sort so you can figure out if the sequence is hanging on the FTP.upload() call or on on the capture() function. Its also best to make sure the previous FTP is complete before moving on to the next one, or aborting it if its timing out.

Link to comment
Share on other sites

There are variables that tell you what's happening:

FTP.bytesTransfered

FTP.bytesToTransfer

The first will go to -1 when the transfer is done. You can use the combination to display a progress bar. But to do a timeout, do something like this:

...
ftp.upload()
private timeout = 10  // 10 second timeout
private st = systime()
while (1)
   if (systime() - st > timeout)
	  ftp.abort()
	  break
   endif
   if (ftp.bytesTransfered == -1)
	  break
   endif
   delay(0.1)
endwhile

Since you would need this in a number of places, I'd make a function out of it.

Link to comment
Share on other sites

  • 2 weeks later...

not yet I have been able with this problem <_< , continues causing to problems the part of FTP, since I leave the part of FTP outside and the application works well. the application is not freeze

// setup FTP

while(1)

delay(50) // wait 50 seconds

//FTP.strServer = "ftp.xxx.com"

//FTP.strUserName = "user"

//FTP.strPassword = "123456"

delay(100)

//ignore("all")

page.Capture("Home_Page","C:\instrument\images\home.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\home.jpg"

// FTP.strRemoteFile = "images\home.jpg"

// FTP.Upload()

delay(40)

page.Capture("Instrumento1","C:\instrument\images\1.jpg")

delay(15)

// FTP.strLocalFile = "C:\instrument\images\1.jpg"

//FTP.strRemoteFile = "images\1.jpg"

//FTP.Upload()

delay(40)

page.Capture("Instrumento11","C:\instrument\images\11.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\11.jpg"

// FTP.strRemoteFile = "images\11.jpg"

// FTP.Upload()

delay(80)

page.Capture("Instrumento2","C:\instrument\images\2.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\2.jpg"

// FTP.strRemoteFile = "images\2.jpg"

// FTP.Upload()

delay(40)

page.Capture("Instrumento22","C:\instrument\images\22.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\22.jpg"

//FTP.strRemoteFile = "images\22.jpg"

//FTP.Upload()

delay(60)

page.Capture("Instrumento3","C:\instrument\images\3.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\3.jpg"

// FTP.strRemoteFile = "images\3.jpg"

// FTP.Upload()

delay(40)

page.Capture("Instrumento33","C:\instrument\images\33.jpg")

delay(10)

// FTP.strLocalFile = "C:\instrument\images\33.jpg"

// FTP.strRemoteFile = "images\33.jpg"

// FTP.Upload()

delay(10)

// Ftp.Abort()

endwhile

Link to comment
Share on other sites

Try making it so all the pages you capture() are only viewed once. Basically duplicate the pages and use one set for viewing in DAQFactory and the other for capturing.

BTW: this is really the reason there is now DAQConnect. With DAQConnect viewing over the web is pretty seamless and also gives you true live data as well as the ability to manipulate it without loading down your DAQFactory installation. See www.daqconnect.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.