Real Time access to ECIO40

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

Moderators: Benj, Mods

Post Reply
alazaro
Posts: 20
Joined: Mon Jun 15, 2009 1:06 pm
Location: Lisbon, Portugal
Contact:

Real Time access to ECIO40

Post by alazaro »

Hello All!!

I have a ECIO40P and I'm wondering how can I access to the I/O pins in real time. I need to updated the output pins and to read the input pins several times during the execution of my program. Please notice that I need to read from the ECIOC to the PC and from the PC to theECIO, and that must be in real time. I want to update the I/O pins in te ECIO from the PC.
At the moment, I use a free version of flowcode V3.6.11.53. I'm able to flash some programs I made and run it with no problem... but I really need to acces from the PC to the I/O pins in the ECIO in real time, I need to read the pins in the time of micro seconds. Is it possible? Can I do it?

I remember to make a program that connects with the PC USB port where the ECIO40 is attached and that same program sends commands to the ECIO40 in order to read and write in is I/O pins. The program mentioned can be done in C or java... but how do I send the comands from the PC to the ECIO40 in real time and during the program execution? Can I use flowcode or ECIOprog.exe? Is there any examples for this?

I also notice that the ECIO40 disconnect from the USB port by itself. I connect it but it only keeps connected for some seconds. It only remain connected when the ECIOprog.exe program is running. Is that normal? the jumper in the ECIO40 is set to USB.

Can you give me some help?

Thanks in advanced!
Γ‚ngela
Regards,
Ângela

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: Real Time access to ECIO40

Post by Benj »

Hello Angela

If your PC is running Windows then "Real Time" is not possible. Real time suggests guarenteed responce times which Windows is unable to do.

You could use the USB slave component to allow the PC to issue commands such as write to output or read from input. The USB Slave examples as part of the USB pack should help you tp get up and running.
I also notice that the ECIO40 disconnect from the USB port by itself. I connect it but it only keeps connected for some seconds. It only remain connected when the ECIOprog.exe program is running. Is that normal? the jumper in the ECIO40 is set to USB.
This is normal and correct operation.

alazaro
Posts: 20
Joined: Mon Jun 15, 2009 1:06 pm
Location: Lisbon, Portugal
Contact:

Re: Real Time access to ECIO40

Post by alazaro »

Hello Benj!

Thanks for your quick answer.

Maybe I did not apply the term Real time in a correct way.
What I need is to access the I/O pins of the ECIO from the PC during run time.
Can I use the flowcode to access to a file in the PC, read the data and write it in the I/O pins of the ECIO? and the opposite?
Can I send data to the ECIO from the PC in run time and that data (bits) appear where I want to, for example in porto A?

I'm sorry for my mistakes.

Regards,
Γ‚ngela
Regards,
Ângela

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: Real Time access to ECIO40

Post by Benj »

Hello Angel

No problem. Just making sure you didnt mean an actual real time system.

Yes what you are suggesting is definitly possible.

There are some examples available for download from here.
http://www.matrixmultimedia.com/FlowcodeUSBPack.php

I would recommend the USB slave component as this will probably be the easiest to implement. The USB serial component would also work.

You will need a piece of software on the PC that will forward data to the device and read data back from the device. The examples above include example source code for VB or Labview as well as the Flowcode microcontroller program.

alazaro
Posts: 20
Joined: Mon Jun 15, 2009 1:06 pm
Location: Lisbon, Portugal
Contact:

Re: Real Time access to ECIO40

Post by alazaro »

Thanks Ben!

Let see if I can do it following the examples.

Regards,
Γ‚ngela
Regards,
Ângela

Post Reply