Web Settings


Recommended Posts

I am having a little trouble sending my main page to our web server.

I have

page.MainPage = "Main"

delay(0.01)

in an Init sequence and here is my web setting box

web.jpg

Now I'm not sure if default file is supposed to be *.jpg or *.htm

Also, would be nice to have a "test settings" option to make sure it "talking" to the site.

Any info would be great!

Oh yea, non-topic related...I'm trying to get a basic array working..do these screenshots make any sense?

vvc_main.jpg

vvc_action1.jpg

vvc_action2.jpg

vvc_action3.jpg

Thanks

Brandon

Link to comment
Share on other sites

Your web settings don't make sense, nor does that script. The DAQFactory webserver is a webserver itself, not a method to upload to another webserver. By enabling the server (with default settings), you can point a browser to your DF computer and view screenshots.

To upload screenshots to another server, which, I might add is the more secure way, you should use the Page.Capture() function:

Page.Capture("MainPage","c:\mainpage.jpg")

and then use the FTP. functions to upload to your server.

As for your array question, I don't really know what you are trying to do. Why do you use the Set To action on two different variables? This will cause two different popups to appear. Also, the AppendValue() function is a member function of the variable, so the format is this:

Array1.AppendValue(ValueToAdd)

Link to comment
Share on other sites

Oh man, did I mess that up...

How does this look?

   Page.Capture("Bristol","C:\Trailer7DAQ.jpg")
   FTP.strServer = "ftp.MySite.com"
   FTP.strUserName = "MyUN"
   FTP.strPassword = "MyPW"
   FTP.strLocalFile = "C:\Trailer7DAQ.jpg"
   FTP.strRemoteFile = "Trailer7DAQ.jpg"
   FTP.Port = "21"
   FTP.Timeout = "500000"
   FTP.Upload("C:\Trailer7DAQ.jpg")
   delay(0.01)

I put it in my export loop...hope that is fine...

About the array, I had 2 Set To variables just to see if the array was actually updating...

I'm just trying to make a simple array to store numbers set by the user...

Thanks again!

Link to comment
Share on other sites

That is almost right:

1) You don't need to specify port (it defaults to 21)

2) Your timeout is exorbitantly long. Something closer to 5000 is probably better.

3) Upload() doesn't have any parameters. You've already specified the file, so its just FTP.Upload()

4) I don't know what the delay() is for. FTP runs asynchronously.

Link to comment
Share on other sites

  • 2 years later...

I have a question please.

I have my screen grab jpegs uploading OK to my FTP site, but the images are cropped. How do I do a page capture that gets the whole screen, as if it was in F4 mode in DF? How do I resize the jpegs so the are full page view, or what can I do?

Link to comment
Share on other sites

OK, part 1: you don't need to give your customers FTP access if the FTP site is a directory accessible from your web server.

Part 2: the dimensions of the Jpeg's are determined by the web settings dialog box. Go to Tools - Web Settings to change them. They are actually independent of whatever the current screen can hold.

Link to comment
Share on other sites

Thanks, I will have to looke into the directory issue about the FTP.

Anyway, I had it working fine, untill today, while using an Verizon Aircard to upload/ FTP the screencapture,

and when I go to the FTP site, the file size of the JPEG is zero, and the error says

" livewell5.jpg cannot be displayed because it contains errors"

Do you have an idea what the problem might be, or how to remedy this?

Thanks

Link to comment
Share on other sites

Not sure, but all is not right with DF. :rolleyes:

My FTP sequence is not uploading files to my FTP site. I can drop and drag just fine with IE,

It;s a Linux site, if that means anything. The sequence doesn't crash, just, the files never make it

to the site. My script in the sequence is unchanged except for usernames, and filenames. From

what it was, when it used to work OK.

By the way thanks for the "directory" tip, I'm headed that way now.

Can you help please??

Link to comment
Share on other sites

First, use the FTP.BytesTransfered and FTP.BytesToTransfer variables along with FTP.Abort() to add some error checking and a timeout. Just fire up a sequence that monitors the bytes transfered making sure it progresses in a timely manner. If it doesn't, use Abort() and try again.

As for your uploading issue, if it worked before, then you changed something and now it doesn't work, then whatever you changed is almost certainly the issue. Debugging 101. Remember that unlike Windows, Linux is case sensitive for filenames.

Link to comment
Share on other sites

All is right, and the planets are back in alignment, But?? :rolleyes:

All I did was install windows updates!!

I knew something was fishy, when I could drag and drop to the ftp server(linux website), but DF was uploading empty files. What, IE8 more advanced than DF?? It can't be so.

So, now, WITHOUT ANY CHANGES TO MY FTP UPLOAD SEQUENCE, it works after installing 17 windows only

updates.

I seem to remember reading somewere, not to install updates, that DF doesn't like them.

Could you explain what you think might have been gone wrong? Other than needing windows updates, I mean,

what else was going wrong, if anything?

I'm almost ready to tackle the witts thread now, but I need to have a default values write/read to/from files

taken care of first.

Thanks for all your help really. DF ROCKS!!

Link to comment
Share on other sites

DAQFactory probably wasn't uploading empty files, but rather just not getting all the way through the upload. By the way: FTP upload is asynchronous. This means if you want to upload more than one file you have to check those variables I mentioned to make sure the previous FTP is done.

DF doesn't care about updates, we just recommend against automatic updates in systems that run 24x7 because they often trigger reboots, not to mention something else that uses system resources are random intervals.

Link to comment
Share on other sites

Ok, thanks for making that clear about windows updates.

But, the same problem has reared its ugly head. Even though it seamed ok early this morning,

it has started to upload empy files to the FTP site again.

What I noticed though is that, when the page capture happens, is happening, whatever, for about 2 to 5 seconds, the file size of the file I am trying to upload is zer0, if I look in the directory where the file is/is being made on the local computer.

I have tried using a delay in my FTP upload sequence, but that has not helped/solved anything. The sequence still wants to upload the empty version of my file.

So, how do I get my sequence to wait for 5 seconds or whatever to give it time for the page capture to do its thing??????? So that when it uploads the file, it doesn't upload the empty version of the file, which by any account, never existed as a saved file on the local computer anyway?! Or did it?

This file is a jpeg, if that means anything.

Or is my computer really just slow? or what?? :rolleyes:

Link to comment
Share on other sites

Did you try just (psuedocode):

page.capture()

delay(0.5)

ftp.upload()

A few things you can do:

If you are using the same file name, delete the old file using File.Delete() before page.capture(). Then you can use the other file. functions to ensure that its fully created before doing ftp. If I remember correctly, page.capture() is also async, so you can't start the FTP right away in the next line of script.

Link to comment
Share on other sites

Thanks for your help, and I will try those code examples tomorrow.

But First, a couple of things.

1) other people have experienced this problem. Not always with DF.

2) no one seems to know how to solve the problem.

3) I have narrowed down the problem with the using of, in my case, Verizon Wireless, internet

access. At my home,

Using Roadrunner/BrightHouse, land line, my files upload fine using DF, to my FTP://ftp>>>anonymous site.

Window update, really didn't solve anything. Just a coincidence.

4) Oilfield service companies, need to send data either by way of Satelite Internet(more espensive), or through cellular company aircards.

5) I will try to box it out with customer service, but I am not expecting much help from Verizon.

6) My only question is, if you have direct knowledge about how to solve this idiosyncrasy, other than the suggestions you have already made, I would like more suggestions please?

Thanks. JQ

Link to comment
Share on other sites

I am going to save other people alot of time, and headaches, by posting this, but here goes. some "free advice".

Verizon Aircards are a piece of @%$^!

At the end of my customer service call with Verizon, I was advised to "Google FTP"

Um, yeah OK dude. Can I have my 45 minutes back that you just wasted please??

Anyway, save yourself some trouble. ATT wireless internet uploads the DF screenshots to my

site, without any problems.

So there you have it, Verizon #^%*!

:rolleyes:

Link to comment
Share on other sites

  • 8 months later...

lol, thanks for shedding the light JQ... :)

I just ran into this issue also, with the Verizon Mifi device...

We are very remote, and are using a cell booster to "up" our signal...The signal "looks" good, but still can't seem to find the sweet spot...

We are spoiled on certain rig with "shared" satellite connections...Makes life easy...

It seems like it should work though, I can access my ftp server via 3rd party progs, but DF doesn't seem to like my 1kb/sec upload speed.

:P

Link to comment
Share on other sites

  • 2 weeks later...

Any advice you give about this issue AzeoTech??

At our location, service with Verizon is spotty, but I can infact connect to my NAS and my webserver via FTP with 3rd party apps (I use CoreFTP) and can send my 220kb screenshot to them with no issue...

I have been using the same FTP code for almost a year now with no issue, but am now hitting a road block...

Now, when the file is not on my server/nas, DF throws "error creating file", but when I manually send the .jpg (again, only 220kb) and start my FTP sequence, I will sit in CoreFTP and watch the process...

First the file becomes 0kb, and then it will be deleted...

Are there any "behind the scenes" stuff for FTP that DF is doing causing me to timeout/error out/and delete the file on my webspace??

Any advice will be great!

Link to comment
Share on other sites

The server is probably deleting when the connection is lost. As to why the connection is lost, I can't say. There is a timeout variable. I think it defaults to 3 seconds. You might try increasing that. Maybe your service has just gotten spottier to the point where you are hitting up against the timeout. Certainly would explain why it works in other programs (which probably have a longer timeout).

Link to comment
Share on other sites

I think it's just my internet conn...

I have my timeout to 50000 (50 secs correct?) and still no success...

Rrrrr, I gotta twist the bosses arm to get a satellite conn out here...That way I can also remote in and "daq it up" from the house. :)

I'm blaming Verizon.... :P

Link to comment
Share on other sites

Archived

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