Burf2000

Dacta control panel and VB using lego.ocx

Recommended Posts

Cool, I didn't know someone had made a browser-based controller for this. That would be a lot more convenient than the original DOS software.

I'm guessing you're using an older computer with a serial port for this, right?

Share this post


Link to post
Share on other sites

I am not using the javascript bit but visual basic and windows forms. My current dell has a serial port too

Share this post


Link to post
Share on other sites
i thought the event would just be triggered but they dont

Anyone got any ideas

I've not used that controller but have some VB experience, I presume you are using withevents?

P.

Share this post


Link to post
Share on other sites

I have not used vb for a while, what do I have to do with WithEvents then, you could be a life saver!

Share this post


Link to post
Share on other sites

I am really struggling with this interface, it works for a bit and crashes, has anyone in the world used the interface B in the last couple of years?

Good came up with a couple but all dead email addresses now

Share this post


Link to post
Share on other sites

I tried using it with RoboLab some time ago, but haven't really done anything big with it. The main reason I didn't invest a lot of time into trying to get something nice running was the very long response time - about a second would pass between a touch sensor was pushed and the related motor stopped.

Share this post


Link to post
Share on other sites
I am really struggling with this interface, it works for a bit and crashes, has anyone in the world used the interface B in the last couple of years?

A search threw up this, which might work. Otherwise, your best bet is to use the original software on it. You might need Dosbox to get it to run.

To be honest, the whole system is probably more trouble than it's worth today and has been superseded by the PF control elements, although I can see why you would want to get it working if you already have the CLI.

I tried using it with RoboLab some time ago, but haven't really done anything big with it. The main reason I didn't invest a lot of time into trying to get something nice running was the very long response time - about a second would pass between a touch sensor was pushed and the related motor stopped.

That's what I have heard too. I was thinking of buying one some years ago, but passed on it after learning about that. It seems to be a limitation of the hardware itself.

Edited by CP5670

Share this post


Link to post
Share on other sites

Thanks for the feedback people. I do have the RCX (well 6 of them), the NXT (2) with IRlink and quite a few pf bit now but I seem to like computer controlled lego rather than the brain being on the rcx / nxt. So I could use a program to command the rcx / nxt (via bluetooth) however I am kinda limited to 3 motors Unless I write sub programs for each nxt to do something with a msg or get the nxt to control PF / RCX. Sadly no ones written a Robotc NXT IRLink plugin for the RCX, only PF.

So I am either looking for a way to control multiple rcx vai a pc, or nxt to rcx/pf to do the same thing as the Control lab could do

Oh and as for the delay, its true (kinda) the 1 second wait seems to be intermittent

Share this post


Link to post
Share on other sites

If anyone is interested I built my own visual basic program to talk to the serial port using mscomm. It can turn motors on and off and detect button presses and also return hex values for all inputs.

Its not finished yet but let me know if anyone else has a dacta control panel (interface b)

Share this post


Link to post
Share on other sites

Hi, i use my interface B all the time for controlling creations, layouts etc. After finding all the information of the protocol online i managed to make software using Liberty Basic, which is similar to the old Qbasic but can work in windows, has way more functionality and is really simple to program with, i can not use it for 6 months and go back to it and within a few hours i can pick it up again.

At first i thought i had a broken unit as i bought mine secondhand in unknown condition without a power or serial cable. The 10VAC power pack from the 9V train regulator was suitable but it took me ages to realize the serial cable wasnt a simple straight through type, it is actually more like a null modem cable, where RX goes to TX and vise versa. After that the fun began of writing some programs.

I can give some sample programs if anyone is interested, and you can get a freeware version of liberty basic online. I used robolab once and only once, that software is absolute crap, and so slow.

Next project when i have time is to make a PIC serial control board that can plug into the serial port on the back of the interface, so it can be used as a standalone unit, no need to use the laptop. Then i can just write the program onto the microcontroller.

I hope this info is useful to someone.

Mike

Share this post


Link to post
Share on other sites

I'd love to get some more information on this?

Do you have a specific envorinment or code subset for doing this? Any written information about it? Do I need to install only the freeware version of liberty basic or is there more to be done to get this to work?

And examples, yes please. You've got me curious about the response times and I'd like to get some first hand information on that!

Share this post


Link to post
Share on other sites
Hi, i use my interface B all the time for controlling creations, layouts etc. After finding all the information of the protocol online i managed to make software using Liberty Basic, which is similar to the old Qbasic but can work in windows, has way more functionality and is really simple to program with, i can not use it for 6 months and go back to it and within a few hours i can pick it up again.

At first i thought i had a broken unit as i bought mine secondhand in unknown condition without a power or serial cable. The 10VAC power pack from the 9V train regulator was suitable but it took me ages to realize the serial cable wasnt a simple straight through type, it is actually more like a null modem cable, where RX goes to TX and vise versa. After that the fun began of writing some programs.

I can give some sample programs if anyone is interested, and you can get a freeware version of liberty basic online. I used robolab once and only once, that software is absolute crap, and so slow.

Next project when i have time is to make a PIC serial control board that can plug into the serial port on the back of the interface, so it can be used as a standalone unit, no need to use the laptop. Then i can just write the program onto the microcontroller.

I hope this info is useful to someone.

Mike

I got to finish mine off, have you managed to work out how to get temp / rotation sensor data working?

Share this post


Link to post
Share on other sites
I'd love to get some more information on this?

Do you have a specific envorinment or code subset for doing this? Any written information about it? Do I need to install only the freeware version of liberty basic or is there more to be done to get this to work?

And examples, yes please. You've got me curious about the response times and I'd like to get some first hand information on that!

Hi,

To start with you will need to download and install Liberty Basic, i think it still can be used fully without purchasing. I remembered for windows xp i had to download an extra dll (i think) for com and lpt port communications, it was in one of the LB forums, you should be able to find it by doing a search.

For details for the protocol i found all the information from the website http://web.telia.com/~u16122508/dacta/ i would recommend copying the info as most of the sites that have this information have closed and im not sure how long this one will last. It took quite some time to find.

The program bricklab from this site works quite well for testing.

If you are planning on using Liberty Basic, to initialize the Interface i only need these lines of code:

Com = 16384

'This just sets the com port buffer (not always necessary)

open "com2:9600,n,8,1,ds0,cs0,rs" for random as #comm

'This is the code that opens and sets the com port

'i.e. Com2 9600bps n (no parity) 8 (data bits) 1 (stop bit) ds0 cs0 rs (settings for the port)

print #comm, "p";

print #comm, chr$(00);

'This sends the character "p" plus the null character, note: you must put the ; after to stop program from sending the linefeed and return codes

'At this time the interface will send back a sentence

print #comm, "###Do you byte, when I knock?$$$";

'Send this as the reply and the interface will be initialized

calldll #kernel32,"Sleep",40 as ulong,r as void

'This is one of the most useful lines of code i have found and use it in every program i write

'It is a simple time delay, all you have to change is the number. In this case it is 40, meaning 40 milliseconds

'This time delay is also very accurate,

dataRead$ = input$(#comm, 33) 'This string is taken from the com port it is 33 bytes long and contains all the data from the inputs

print dataRead$ 'This just prints it on the screen

Now the interface times out after 2 seconds if nothing has been sent to the interface or if it hasnt been polled. Therefore when i need a time delay longer than this i make a for next loop, this will loop x number of times which can have a 1 second time delay each time.

Now for setting the outputs i created a function, this goes at the end of the program after the end statement.

Function output1(port, onoff, direction, speed)

print #comm, chr$(176 + speed);

print #comm, chr$(2 ^ port);

print #comm, chr$(64 + (direction * 8) + port);

print #comm, chr$(40 + (onoff * 16) + port);

End Function

So to set an output in the program i can write:

h = output1(0,1,0,7)

'the h is irrelevant, it can be whatever you want but something needs to be there for it to work

'This sets 0 (port 0 [0 - 7]) , 1 (sets to on [0 or 1]) , 0 (sets the direction [0 or 1]) , 7 (sets the speed [0 - 7])

The syntax of LB is quite easy to follow especially if you have programmed before.

Send me an email to skaako@hotmail.com and i can send you a copy of a few programs i have made. I am more than happy to answer any questions you have or need help with a specific program. Also i checked the LB site and you can run the programs from LB with the free version but you cannot compile to use as a standalone program, i have the full version so i can compile your final program for you and send it back.

Mike

I got to finish mine off, have you managed to work out how to get temp / rotation sensor data working?

Hi there,

I dont actually have many Lego sensors, i just use regular electronic sensors. But for temperature i have used a LM335 Temperature sensor with the right resistors gives a output of 0 to 5V over the range of -40°C to 100°C. As all the inputs are 10bit resolution this gives 1024 steps. I have never tried a rotational sensor as i don't have a lego one, but the info on extracting this data from what the interface sends can be found from the website i stated in the last post.

Any analogue sensor should be able to be used as long as the output voltage is in between 0 and 5V. I havnt been too adventurous in trying as i only have two of these interfaces and dont want to blow them up. I have tried light intensity sensors, temperature sensor above, switches and variable resistors.

Thanks for the interest i hope you get your project finished.

Mike

And examples, yes please. You've got me curious about the response times and I'd like to get some first hand information on that!

As for the response times, for robolab there is a very large delay to register inputs etc. This is the software and not the interface. With my programs and using Bricklab there is no (well not noticeable) delay, maybe a few ms as a guess.

Mike

Edited by skaako

Share this post


Link to post
Share on other sites
For details for the protocol i found all the information from the website http://web.telia.com/~u16122508/dacta/ i would recommend copying the info as most of the sites that have this information have closed and im not sure how long this one will last. It took quite some time to find.

The syntax of LB is quite easy to follow especially if you have programmed before.

Thank you for the detailed response. I'm especially thrilled about the response time which was so crappy in Robolab I completely gave up on it.

I had that link somewhere in my bookmarks too, together with a now defunct link to an Active X interface...

Send me an email to skaako@hotmail.com and i can send you a copy of a few programs i have made. I am more than happy to answer any questions you have or need help with a specific program. Also i checked the LB site and you can run the programs from LB with the free version but you cannot compile to use as a standalone program, i have the full version so i can compile your final program for you and send it back.

Does this mean I can run the code from the interface directly? In that case compiling the code into a stand-alone executable is an unnecessary luxury (still nice though)

Share this post


Link to post
Share on other sites
Does this mean I can run the code from the interface directly? In that case compiling the code into a stand-alone executable is an unnecessary luxury (still nice though)

Hi,

Yes you sure can, just hit the run button on the menu and away it goes, No need to compile at all. Actually i very rarely use the compiler, only when i have finished a project.

Mike

Share this post


Link to post
Share on other sites
At first i thought i had a broken unit as i bought mine secondhand in unknown condition without a power or serial cable. The 10VAC power pack from the 9V train regulator was suitable but it took me ages to realize the serial cable wasnt a simple straight through type, it is actually more like a null modem cable, where RX goes to TX and vise versa. After that the fun began of writing some programs.

I too got my unit second hand, however with a macintosh cable which is totally useless for me. Therefore it is very valuable to hear that the serial cable should be of null modem type. My problem is though that all null modem cables I have found so far have female connectors in both ends (in order to connect two computers). Since the interface also has a female connector, I guess the null modem cable needs to have one male and one female connector. Is it possible to find such null modem cables or does one have to solder it by oneself?

Another questio: Did anyone try this software (Flowol http://www.flowol.com/InterfaceLEGOB.aspx) for interface B?

Share this post


Link to post
Share on other sites
I too got my unit second hand, however with a macintosh cable which is totally useless for me. Therefore it is very valuable to hear that the serial cable should be of null modem type. My problem is though that all null modem cables I have found so far have female connectors in both ends (in order to connect two computers). Since the interface also has a female connector, I guess the null modem cable needs to have one male and one female connector. Is it possible to find such null modem cables or does one have to solder it by oneself?

Another questio: Did anyone try this software (Flowol http://www.flowol.com/InterfaceLEGOB.aspx) for interface B?

Hi there,

It is possible to use an adapter that is male-male or female-female depending on what you need. If you have the parts you can make a cable quickly, you only need to wire 3 pins. TX-RX RX-TX and GND-GND. Or you could make this as an adaptor and just use it with a straight through cable.

When i bought mine secondhand mine too came with the mac stuff, so i just modified that cable.

Mike

Share this post


Link to post
Share on other sites
I too got my unit second hand, however with a macintosh cable which is totally useless for me. Therefore it is very valuable to hear that the serial cable should be of null modem type. My problem is though that all null modem cables I have found so far have female connectors in both ends (in order to connect two computers). Since the interface also has a female connector, I guess the null modem cable needs to have one male and one female connector. Is it possible to find such null modem cables or does one have to solder it by oneself?

Another questio: Did anyone try this software (Flowol http://www.flowol.com/InterfaceLEGOB.aspx) for interface B?

I not tried Flowol out, looks interesting

For details for the protocol i found all the information from the website http://web.telia.com/~u16122508/dacta/

Most useful source I found, the dll works a little then dies but the information is vital

Share this post


Link to post
Share on other sites
Hi there,

It is possible to use an adapter that is male-male or female-female depending on what you need. If you have the parts you can make a cable quickly, you only need to wire 3 pins. TX-RX RX-TX and GND-GND. Or you could make this as an adaptor and just use it with a straight through cable.

When i bought mine secondhand mine too came with the mac stuff, so i just modified that cable.

Mike

Yep. I cut away the macintosh connector and soldered a female serial connector to the wires according to your instructions. Will try the interface this evening to try to get som life in it (at least the on-connector works). Thanks for all help!

Share this post


Link to post
Share on other sites
I not tried Flowol out, looks interesting

For details for the protocol i found all the information from the website http://web.telia.com/~u16122508/dacta/

Most useful source I found, the dll works a little then dies but the information is vital

I tried the link but it seemed to be dead.

Yes, this website was where i gathered all the information on the protocol, it had everything i needed to get started. I noticed the same thing with the dll when i tested it, i think it might just be overflowing the uart buffer or something along those lines.

Mike

Share this post


Link to post
Share on other sites

I finally took a picture of how i can control the interface with a microcontroller. I still do not personally have a use for it, but i guess a setup like this might be handy for people who take them to shows etc. It does not require a computer connected to the interface, the USB is only to provide the 5V via a 230-5V USB adapter.

dacta_controlled_by_pic.jpg

I guess now its more like a big RCX.

Mike

Edited by skaako

Share this post


Link to post
Share on other sites

I have several of the Control Lab Interfaces that I use with the 9701 Control Lab Building kits.

There are many different software options available depending on what you are hoping to accomplish:

1. Original Control Lab TC LOGO software (DOS based)

2. Windows Control Lab (same as above but works in Win95/WinXP)

3. Robolab

4. ActiveX Controls

More recently I came across a Lugnet member that was working on a VB.NET interface for the CLI. See the link below.

I did some testing with it and found it to be quite repsonsive. Another nice feature was the ability to connect several CLIs to a single computer and access them directly from a single VB program (imagine the possibilites).

5. Visual Basic DLL (http://news.lugnet.com/dacta/?n=261)

BManCan

Share this post


Link to post
Share on other sites
....Another nice feature was the ability to connect several CLIs to a single computer and access them directly from a single VB program (imagine the possibilites).

BManCan

I wish i had more than one of these, then i could experiment with controlling multiple CLI's. They seem to be as rare as hens teeth to get hold of now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.