ECIO and Visual Basic

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

ECIO and Visual Basic

Post by Jay Dee »

Hi,
I've been using Flowcode4, Eblocks and ECIOs for a couple of projects which have proved useful around the workshop and have really enjoyed the Flowcode/Eblocks system. Looking to the future, I may continue a projects development and head towards a commercial product and ....

First.
The ECIO (PIC 40) is a great module, allowing in the field program updates and would mostly be dropped into projects as a daughter board but some projects are very space sensitive and I need to have everything on a single odd shaped tiny PCB. Looking at the components of the ECIO, a replication on a custom PCB would not be too hard BUT is there custom Matrix code in the ECIOs 18F4455 that is not freely available and I would be unable to load into an 'off the shelf' 18F4455.
If it was possible I could stay 100% within the flowcode environment for coding but use custom hardware based on the development ECIO and Eblocks.

Second.
To get User parameters to a device, it seems sensible to look at using visual basic and send parameters from a small program over USB to a ECIO based project. Is there a version of VB you would recommend, VB6 is still around but VB .Net seems more likely to work on modern windows PCs and with USB.

Thanks for any pointers.
John.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: ECIO and Visual Basic

Post by Steve »

Jay Dee wrote:First.
The ECIO (PIC 40) is a great module, allowing in the field program updates and would mostly be dropped into projects as a daughter board but some projects are very space sensitive and I need to have everything on a single odd shaped tiny PCB. Looking at the components of the ECIO, a replication on a custom PCB would not be too hard BUT is there custom Matrix code in the ECIOs 18F4455 that is not freely available and I would be unable to load into an 'off the shelf' 18F4455.
If it was possible I could stay 100% within the flowcode environment for coding but use custom hardware based on the development ECIO and Eblocks.
We have a scheme that will suit your needs. I will contact you directly with details.
Jay Dee wrote:Second.
To get User parameters to a device, it seems sensible to look at using visual basic and send parameters from a small program over USB to a ECIO based project. Is there a version of VB you would recommend, VB6 is still around but VB .Net seems more likely to work on modern windows PCs and with USB.
This is largely up to you. We have examples in VB6, VB.NET and C#. By using the "Serial" USB component in Flowcode, it is very simple to communicate with any PC-based programming language.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO and Visual Basic

Post by Benj »

Hello,

My advice would be to look at the USB slave examples as part of the main Flowcode download. There should be a VB.net example in there that's fairly simple and ready to go. We also have a couple of articles that look at this functionality. You can find these from the learning centre section of our website.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: ECIO and Visual Basic

Post by Jay Dee »

Thanks Guys,
I think I'll have a look at Visual Basic (.Net) in Visual Studio Express and your sample files. I'm not looking to do anything fancy but from what i can see from a quick search is;
Visual Studio Express is free to download from M.S.
Anything I write using the Visual Studio Express can be distributed freely.... which is great!
Visual Studio Express is currently supported.
As long as my customers have a current .Net framework installed and I supply the right files, the program should run properly on most PC's with modern OS's.

Oh the joy! :-) ! Combined with soething like the ECIO, Projects that can be deployed without needing an old school Rs232 COM port!!!
...right, now just need a few months uninterrupted 'me' time to get something sorted. :lol:
J.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO and Visual Basic

Post by Benj »

Hi Jay,

Great let us know how you get on and if you hit any snags along the way :)

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: ECIO and Visual Basic

Post by Jay Dee »

Snag :-)
Visual Studio 2010 Express, (containing VB Express) is free to download, will create a standalone .exe program and you can distribute your program, which is great but they pulled the upgrade wizard in the 2008 edition so I cant import any VB6 examples. I've had a fairly good trawl about but can find any VB.NET examples for the flowcode USB functions.

So I looked at VB6 as I have a few VB6 books from when I was at Uni but you now cant get a copy of VB6 (except as a torrent).

Do you have any VB.Net examples for the USB Slave or is it realistic for a total beginner to attempt the VB6 file to VB.NET conversion process, apparently even the 2008 convert program only did so much and there is alot of debugging to get VB6 program to compile correctly in VB.Net?
Regards, J.

P.S.
For others thinking of using or staying with VB6, the good news is the following official MS statement "Visual Basic 6.0 applications that run on Windows XP will also run on Windows Vista, Windows Server 2008 and Windows 7" and the runtime files needed to run a VB6 program on another PC are also freely available.
http://www.microsoft.com/download/en/de ... n&id=20429 So at least whatever your write in VB6 can still be used on a current MS operating system.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO and Visual Basic

Post by Benj »

Hello,

Here is a VB.net example for the USB slave device.
Exercise 6 - Basic Slave.zip
(457.36 KiB) Downloaded 875 times
Let me know if you have any problems.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: ECIO and Visual Basic

Post by Jay Dee »

Hi Guys,
I'm having another crack at Visual Studio / Visual Basic.Net I had some success with a small project on VB6 but times have moved on and so must I ... :)
I'll probably work the new project with ECIO40P or ECIO40P16 devices... I noticed a thread with QMESAR on some issues with the ECIO40P16 earlier this year so un-installing FC6.1 and installing the latest and greatest.

Are the USB slave examples compatible with Visual Studio 2015 (Free Community edition)?
Is there a link to the latest USB examples ?
The conversion of an old USB slave example seems to have worked (in a clunky way with a few errors) but I'm a bit unsure if its working properly as .Net is all new to me and though it best to ask if there is any newer examples ?

regards, John.
BTW there is now an ECIO driving a robot monkey, strapped to a racing camel owned by the king of a middle eastern country.... you never know what jobs you'll get in this game! :D

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: ECIO and Visual Basic

Post by Jay Dee »


User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO and Visual Basic

Post by Benj »

Hi John,
BTW there is now an ECIO driving a robot monkey, strapped to a racing camel owned by the king of a middle eastern country.... you never know what jobs you'll get in this game! :D
This sounds amazing, I don't suppose there is a photo :D

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: ECIO and Visual Basic

Post by Jay Dee »

Sadly bits of it are still under a silly NDA..but if we go to production it'll go public so can send a pic. J.

Post Reply