Program the K8055 with your mouse

Thanks Hob about actions.
do youknow why I get runtime error 9 when I try to reset all digital outputs?

Norman

Thanks Hob about actions.
do youknow why I get runtime error 9 when I try to reset all digital outputs?

Norman

Hello Norman.

I really have no idea why and when you get this error.

The code indicates that I have not reserved a variant.
When I can reproduce this error I can probably fix it.
However when I set or reset all digital outputs the error doesn’t appear. (Using cards 0 and 1)

So could you describe what you are programming and when the error appears? (During programming or running the program?)
You can even mail your self programmed program to me so I can reproduce the error.

Hilbrand

[quote]So could you describe what you are programming and when the error appears? (During programming or running the program?)
You can even mail your self programmed program to me so I can reproduce the error.
Hilbrand
quote]

below is the simplest prog that i get runtime 9 error
initialise : reset all dig outs
if input 1 is false set dig out 1

 press start

runtime error 9 appears

when I press ok program disapears from screen (crashes)
thanks
Norman

Ah now I know what you mean.

As soon as I read that you use the initialize line for resetting the outputs I knew what could be wrong.
The initialize line was added later for pre-setting the timers and was only tested with the timers. Later the option set and reset all was added but not in the initialize line.
So on my site there is an update available now.

I hope it will work for you.
Hilbrand.


Yesterday I had some login trouble. Probably I mistyped my password and thus I had to use the Captcha to login. However it was not clear to me I had to type it at the bottom of the screen and also had to retype the user name and password.

[quote][Ah now I know what you mean.

/quote]

thanks Hilbrand

NORMAN

Hi, i’m new around here.

Your programs seem interesting, i download it and made the installation. I have a little problem with both of them. I’m able to made the demo work with my 3 different K8055, but with your program, the program is saying: The USB card not found.

I have windows XP pro, service pack 3

During the installation of your program i receive a message saying that i have a newer version of the mfc40.dll, except that, no error. Are you aware of this problem ? Can you help me please, if possible.

Sylvain

Sylvain,

not finding the cards is new for me. Maybe the k8055d.dll version is the problem, but I have to say you would be the first having this problem related to the DLL.
Soon there will be a new version where the version of the DLL that is used can be shown on your screen.

Please first try it again on another computer and tell me if the problem of not finding the card also appears.
Try it with one card connected.

I dont know what mfc40.dll does, but it should not be a problem.

Hilbrand

Ok, i have install the program on one of my other computer and i receive the same message saying that the mfc40.dll is newer on my computer, but this time i let the installation put the oldest one. And the program is working now, it seem that the problem. Your program is made in C/C++, this is use for that.

Do you think you will add the or someday? I would like to be able to make a latch or a few thing like that (start and stop).

Very interesting your program, it remind me of the ladder for the PLC, I’m using at the job.

I’m interested how you have made your program for the network, can you explain me? What langage did you use to do it? Keep me inform if you want.

Good to hear from you what caused the problem.
I assumed that mfc40.dll was a backwards compatible .dll but that seems not to be so.

The OR will be added, but for my work I had to develop a lot of other things, so time is a problem.
In August we will move into a complete new building (school) so that will take a lot of time too.

Or can be programmed now by using the same action in 2 different lines.

Line 001 In 1-------------------Set Out 1
Line 002 In 2-------------------Set Out 1

Output 1 will be Set by Input 1 OR Input 2.

The program is written in Visual Basic 6.0!
For the network I use mswinsck.dll. You can find a lot of program examples on the internet. It can be used for VB and C/C++.

Hilbrand

Hi Hob,

It’s me again. I want to know where you have found example for this DLL., mswinsck.dll. I’m not able to find anything, except saying it’a an OCX or something like that, but no example. But question, with this DLL, are you transferring the data in a file to the other computer, or you are accessing the output directly ?

If it’s with a file with the last Visual Basic(Visual Basic 2008 Express Edition), they have a command to transfer a file to a computer in the network(My.Computer.Network.UpLoadFile). I will have to make a program for both of the computer, but i think that will be possible to do it this way.

Thanks for the help

Hello S.Maltais.

For VB 6.0 you’ll find examples and a manual here…

http://www.phoenixbit.com/site/tutorials.asp?category=UHJvZ3JhbW1pbmc6OlZpc3VhbCBCYXNpYw

The winsock control makes it rather easy to send control codes and text.

Take a look at it. The client and server will even run on the same computer, but it’s nice to use 2 computers.
As I think you will know, it wil take time to understand the code en even much more time to write your own programs.

Hilbrand.

Yesterday I bought an Acer Iconica W500 tablet. Yes I know the I-pad and Android run smoother and are thinner and lighter.

However they don’t support USB and Flash the way I like it.

So a Windows 7 tablet and of course I connected the K8055. That all went well but when I started the software the screen was not drawn the way it should.
It looked as if the sreen resolution was wrong. Buttons were not placed on the right place or disappeared completely.

Hmmm what is this, why is it happening. I had no idea, so I installed VB 6.0 to see what happens using a debug mode.
Hmmm no dvd drive avaiable… However I have a universal kit with a power adapter that can be used to connect IDE and SATA harddisks via a special USB cable.
So a cdrom was connected and vb installed. That worked really nice.

Sadly the problem didn’t disappear. The code seemed OK and the used values to place the objects were also right.

Looked like a real problem.

After some digging (google) I found the solution for my problem.

When right clicking on the desktop you can change the screen resolution.
When doing so you can select an option to make text and other objects bigger or smaller. (Thats what it’s called in Dutch)
It was set to 125%, setting it at 100% solved my problem.

All programs that I have written work OK now on the W500.

HOB