CAI WebControl Logger [Software]

Hi, the code is developed over a long time, so No.
But I can help you getting started.
Create a VB Project, Add Microsoft Internet Transfer 6.0 (SP6)
Insert a TextBox named "Text1" and Command1 Button.
Code:

Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("http://" & "UserName" & ":" & "Password" & "@" & "192.168.0.15" & "/" & gett1.cgi & "")
End Sub

Will show Temp Sensor #1 Value in Text1.
Edit Username, Password, Ip Adress in the code.
A easy way of playing arround is to add textboxes instead and play with the code.
You can also use variables so you avoid doing something wrong inside the code.
Just remember to remove the " " when adding Boxes.
 
Happy Programming!!!
 
LarsK,
 
that is all I needed - THANK YOU tons!
I never knew how to make a connection, the rest I can figure out,
have a great week,

Rainer
 
Tried tonight to use VB.Net to get some data strings. Here is an example pulling data from a URL:
 

Imports System.Net
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim inStream As StreamReader
Dim webRequest As WebRequest
Dim webresponse As WebResponse
webRequest = webRequest.Create(TextBox1.Text)
webresponse = webRequest.GetResponse()
inStream = New StreamReader(webresponse.GetResponseStream())
TextBox2.Text = inStream.ReadToEnd()
End Sub
End Class

Create TextBox1, TextBox2 and Button1.
In TextBox1 insert the text:

http://www.weatherby.dk/WC8/WC8.txt

(WC8.txt is a text file stored on my server)
 
 
 
If you prefer to run the link inside the code replace text1 with this string:
 

webRequest = webRequest.Create("http://www.weatherby.dk/WC8/WC8.txt")

And rem the line:
 

' webRequest = webRequest.Create(TextBox1.Text)

 
Run the program and it should look like this:
 
wc8example.jpg

 
This code should be good to pull data from the WC8 board.
 
Enjoy!
 
mc2000 said:
How about an extra tab that allows connection of WebcontrolA to WebcontrolB

what i mean is - polls WebcontrolA input 1 for 1/0 , and then sets WebcontrolB output 1 to 1/0. ?
 
great, but I do not undertstand why using an expensive intermediate device. If you use WEBSET you may  create a lean solution. My proposal was to set the syncing actions in a web interface, creating the necessary code on the WC. And of course the inputs should have real names in that web interface...
 
rossw said:
Do you buy a car, then go back to the dealer and whinge and complain that it would be SO much more useful if it had tracks instead of wheels, and hound them for months and years about it?
 
Do you complain that the base model you bought (which was 20% of the alternatives) doesn't have a turbo, a 6 litre V-10 engine, and a sunroof, because by golly, they would all be real handy!?

Do you take up a petition and lobby the government to force the carmakers to upgrade them to electric for free, because that would make them "more attractive to others"?

So why do you constantly criticise the WC boards for not doing what YOU want? There ARE boards out there that will likely do what YOU WANT, but you choose not to buy those and complain here instead. If you want change, do so in a reasonable, professional, businesslike manner. If your "improvements" are something that appeals to the wider audience, articulate it in a clear and professional way, with some sort of justification. Suggest ways it MIGHT be done, not just complaining that it isn't done the way YOU want. Of course, if the only one who will benefit from your "demand" is you, I just can't see what possible motivation there is for CAI to do anything! And every time you make yet another "demand", or criticise the product for not doing your particular thing, it further diminishes any interest in assisting you, or listening to your views. (Not sure that applies to CAI, but it is certainly the way I would be viewing it!)
 It would need only small effort allowing us to give names to the variables and sensors in the web interface...
But my reply was not about CAI, but the trend towards using a master, polling the WC reading input signals and setting output signals. This bears the risk that PLC will become obsolete. 
Adding to your allegations: I still have not found my ideal solution (WiFi enabled but no , or 10 bit ADC as one example) , but I'm sure some kickstarter campaign will get the money coming close to it replacing the WC soon.  If you check the projects you will see that a no from CAI still does not mean that it is not doable.
 
LarrylLix said:
It's either a reading comprehension problem,  jealousy, or too much rum. :)
 
Some people read with a bias. The previous was an excellent  example: immediately after you suggesting how the WC8  could do the job better and then the criticism for berating the WC8 board.  ROFLMAO.
 
Perhaps a reread with some attempt to understand what is being said??
 
I can't follow. My wish is having a fully productive system supporting the tinkerer, this might be a revamped WC:
- verbose i.e. 8 character names instead of VAR1, T1, RAM1, AI1...
- comments allowed also in the PLC itself
- external WC management tool for one click updating the firmware and management of code and settings  for multiple WC at the same time, providing a code sniplet repository adding may be some template based code generation and some debugging capability (via simulation)  etc.
Some of the previous wishes were already fulfilled like the software stack reset, some are nice to have, others like https a must for professional applications.
If I mention the wasteful use of the PLC as dumb reduced functionality device, then because it brings us away from the decentralized intelligence model, in the best case this would be redundant if you split the PLC and the RESTful IO part. Dual processors are not uncommon, especially if you run strong encryption.
 
hope you may accept this idea, you don't have to favour it but please depict your reference architecture for the sake of CAI staff.
 
progress 2...
so finally installed electrical wiring, connected stowe, 3 thermocouples, fan and 3 pumps. Installed a 8 2A relay board.
with a little help wrote a source code and tested the system. everything was done remotely, with a help of a little web camera, to see, if PLC logics and sequences work as planned.
I got to tell - it works! 
few more steps needed - tried to install Lars software for logging of temperatures. got into a problem - installation could not be completed, got a message from Windows:
"Component "QProGIF.ocx' or one of it's dependencies not correctly registered: a file is missing or invalid".
 
Lars, any clue what that could be? My PC runs Windows server 2012.
 
Hi, seems like the installer is not working as it should. Unpack the zip file, copy the file to folder C:\Windows\System32\
Type "CMD" in search box. Use dos window and Browse to C:\Windows\System32\
 
Commands:
cd c:\
cd windows
cd system32
 
(Since you are running Windows server 2012 I guess you know this.)
Now, type this command in dos window: "regsvr32 QProGIF.ocx"
 
View attachment QProGIF.zip
 
Update: Ended in a update of the code. Seems there is a lot to be rewritten due to hasty/dirty coding. I also have a issue getting access to the web to retrieve data for the updates. I will release a new version with the full installer in the next 10-30 days or so...
 
Just got the web data working. Seems like the old protocol is blocked so I can't read the values. But strange enough I can get the data in my web browser...
Used a different one, and finally it works. Just some more coding and I'm done with the upgrade.
 
Anyone having any luck getting this to work?  I'm on a 64 bit Win 10 laptop and getting the error message:
Component 'QProGIF.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
 
Thanks All!
 
Back
Top