Page 1 of 1

MIAC Debugging

Posted: Wed Apr 18, 2012 12:31 pm
by james87price
Hi,

I've been scanning through the forum but haven't found a solution. Could you help please?

I'm trying to debug a program on a MIAC but can't seem to get FlowCode to communicate with the ICD, with the following error message:

Image
Also, the LEDs go from "solid" to slow blinking.

I've tried several programs and all produce the same results.

Thanks in advance!

James

Re: MIAC Debugging

Posted: Wed Apr 18, 2012 12:39 pm
by DavidA
Hello James,

Are you connecting the Flowkit in the correct way for a MIAC? Page 7 of the HP299 datasheet should give you a good indication of how to connect it.

http://www.matrixmultimedia.com/resourc ... 9-30-1.pdf

Re: MIAC Debugging

Posted: Wed Apr 18, 2012 12:43 pm
by medelec35
Hi James,
To me (not an expert) that looks like a communication issue.

I know this may sound like a daft question, but after programming Miac via flowkit, is the prog switch, back on ICD?

I am assuming you used Flowkit to prog Miac?
If not, It would be the best way and leave Flowkit connected to prog Miac.
You could try removing and reconnecting flowkit from PC to usb.

It sounds like flowkit drivers are installed otherwise LEDS won't flash slowly?

Martin

Edit: posted at the same time as David so you may already have the answer?

Re: MIAC Debugging

Posted: Wed Apr 18, 2012 1:08 pm
by james87price
Hi,

Thanks for fast response!

Yes DavidA I've got it plugged in correctly. And Martin I've tried the programming via FlowKit then switch over to ICD mode. But... Same problem.

Could there be a problem with my operating system or installed driver? I am running 64 bit OS so installed dpinst_amd64.

James

Re: MIAC Debugging

Posted: Wed Apr 18, 2012 1:31 pm
by medelec35
With switch on ICD, can you see the Flowkit in the Device Manger?

Re: MIAC Debugging

Posted: Wed Apr 18, 2012 1:54 pm
by james87price
Yep. And it disappears, as expected, when switching back to prog.

Re: MIAC Debugging

Posted: Mon Apr 23, 2012 9:36 am
by james87price
Can anyone help with this? Or point me in the right direction...?

Thanks,

James

Re: MIAC Debugging

Posted: Mon Apr 23, 2012 12:44 pm
by petesmart
Hi James,

I currently run AMD 64 bit OS windows 7 with MIAC...it works quite well...

Can you confirm that the device appears then disappears when you switch from ICD to prog... Does windows give you the confirmation sound on change of device status?

I seem to recall that I had a similar issue in the early days of MIAC and flowkit...As this was at least a year ago I'm a little sketchy on the recall, however it may have been specifically related to a particular chart...

I would try something simple first... Can you create a chart with a minimal number of blocks to turn on and off the first output on MIAC with a one second delay....once this simulates correctly then load to MIAC and verify it runs as the simulation..

Then, go back and turn on the ICD debug, recompile and load, flip the switch on flowkit then hit the run button...do you still get the same error response?

Also try a reset on MIAC before running... Do you get the same response?

Let me know how you go?.


All the best

Pete

Re: MIAC Debugging

Posted: Mon Apr 23, 2012 2:39 pm
by james87price
Hi pete,

Yes the device appears when in ICD mode, then disappears when switching to prog, accompanied by confirmation sound.

I've been using MIAC example files now, as I figure they are bound to work?

Another little thing I've spotted. When I press Go to try and run the file in debug mode, the USB led on the miac blinks very quickly a couple of times then the communication failure notice comes up. Seems like it's getting through the flowkit fine and then having a problem with the MIAC..?

Any more ideas?

Jp

Re: MIAC Debugging

Posted: Mon Apr 23, 2012 7:59 pm
by petesmart
Hi James,

Good sounds like the drivers are ok

Are you using V4 or V5?.... I don't think I have used flowkit on V5 and MIAC...

Did you try the simple Programme of turning the 1st output on and off...?

Best

Pete

Re: MIAC Debugging

Posted: Mon Apr 23, 2012 9:36 pm
by medelec35
Have you got any thing else plugged into usb?
If you have a EB006 for example, the will need to be unplugged.

If you would like to post a flowchart, I can check it with my Miac and flowkit


Martin

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 9:39 am
by james87price
Hi,

I have no other hardware plugged in besides a usb mouse. I tried unplugging this as well, and same result.

I really don't think it's my flowchart. I can't get any charts running in debug mode...

I am running v5 with the flowkit and MIAC. Could this be the problem?

James

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 10:09 am
by DavidA
Hello James,

no this should not be a problem at all, do you have a v4 you could check with for sanitys sake?

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 10:49 am
by james87price
No i'm afraid not. We recently upgraded from v3.

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 12:26 pm
by petesmart
James,

What example chart are you using?... Post it and I will check it for you tomorrow on my V5 kit...

BTW. I am assuming that your Programme runs on MIAC?

Best

Pete

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 1:13 pm
by james87price
I have made a simple chart, see attached, which prints an appropriate number on the screen and turns on the corresponding relay.

If I turn ICD mode on and then compile to the MIAC, it doesn't respond.

However, if I turn ICD mode off and compile, the code does work on the MIAC as expected. Then I tried turning debugging on, and connecting in the right way, and communication fails.

If code is needed to be added to the flowchart to enable communication in ICB mode, it seems this is not happening and instead corrupting the chart instead.

Is this right, and if so, how do we resolve?

Re: MIAC Debugging

Posted: Tue Apr 24, 2012 6:45 pm
by medelec35
Hi James,
I have tested your flowchart on my system, and all was working with win7 64bit:
Flowkit & Miac Test V5.png
(107.67 KiB) Downloaded 10341 times
But then It stopped just like yours did and displayed all 0's on the lower line..

I got it going again.
I think the issue is to do with power settings of the USB device?
Here is what I did:
In Device Manager, right Click on 'Matrix Flowkit' under Custom USB Devices & select properties.
Select the Power Management tab and unselect 'Allow the computer to turn off this device to save power' then select OK
Then switch flowkit to Program, then back to ICD.
That worked with me, hope it does for you :)

Martin

Re: MIAC Debugging

Posted: Wed Apr 25, 2012 3:08 am
by petesmart
Hi James/Martin,

As promised I checked your post on my rig... I worked fine and as expected. Following Martin's good advice i checked the device power - mine is set to on, and all worked normally...

I edited the file reloaded and debuged several times - performance was rock solid...

One question I did not ask up front - Are you using windows Vista? - I had god awful trouble with USB and MM deviceson Vista - ports basically went to sleep - even when the autopower was disabled. Flowkit was particulalry unstable.....Windows 7 64bit works far more reliably....there are several posts on this site with similar experience..

Hope the power management trick from Martin works.... let us know how you go...

FYI driver detail for my current rig attached

all the best

Pete

Re: MIAC Debugging

Posted: Wed Apr 25, 2012 7:01 am
by medelec35
That is a good idea to show a screen shot of the drives properties Pete, I should have done the same.
I have the same version as you.
If I remember correctly, I downloaded drivers from here:
http://www.matrixmultimedia.com/eblock_datasheets.php
(bottom right of the page)
There is also a link here:
http://www.matrixmultimedia.com/support ... f=30&t=605
(at the lower part of the page)

I'm guessing you have the correct version as I don't believe there has not been any recent updates for the drivers?


Martin

Re: MIAC Debugging

Posted: Wed Apr 25, 2012 9:52 am
by petesmart
Aaaahhhhh....Thanks Martin...you triggered my memory....James has come from V3 to V5... Jumped over V4..

Now I seem to recall that the software driver disc supplied with early MIAC was ELSAM 2.3... The latest one is ELSAM 2.4, supplied with later versions of hardware V4 (etc)....maybe this is the difference? I remember the combination of V3/VISTA and flowkit was pretty flaky...

I would definitively confirm your driver versions and possibly as a precaution reload/update drivers etc from ELSAM 2.4 or the MM website... Martin what do you think???

Best

Pete

Re: MIAC Debugging

Posted: Wed Apr 25, 2012 10:31 am
by james87price
Result...!!!!!!!!

So I noticed from your screen shots that the drivers for my Flowkit didn't have the ECIO version of the mchpusb64.sys file. I realised I didn't have an ECIO board so clearly was missing a driver for the MIAC... So just went round the loop of reinstalling all drivers for Flowkit and Miac.

Strangely I could compile direct from Flowcode without this driver in place.

Anyway, it all works fine now. Thanks so much for your help!

James

Re: MIAC Debugging

Posted: Wed Apr 25, 2012 1:38 pm
by petesmart
Thanks for letting me know..this was a joint effort...thanks also to Martin!

Best regards

Pete