MIAC Debugging

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

MIAC Debugging

Post 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

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: MIAC Debugging

Post 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Debugging

Post 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?
Martin

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Debugging

Post by medelec35 »

With switch on ICD, can you see the Flowkit in the Device Manger?
Martin

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post by james87price »

Yep. And it disappears, as expected, when switching back to prog.

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post by james87price »

Can anyone help with this? Or point me in the right direction...?

Thanks,

James

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post 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
sorry about that Chief!

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post 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

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post 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
sorry about that Chief!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Debugging

Post 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
Martin

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post 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

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: MIAC Debugging

Post 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?

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post by james87price »

No i'm afraid not. We recently upgraded from v3.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post 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
sorry about that Chief!

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post 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?
Attachments
FlowKit Test.fcf
(11.43 KiB) Downloaded 290 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Debugging

Post 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
Martin

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post 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
Attachments
flowkit driver detail.JPG
flowkit driver detail.JPG (60.65 KiB) Viewed 16025 times
sorry about that Chief!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Debugging

Post 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
Martin

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post 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
sorry about that Chief!

james87price
Posts: 14
Joined: Thu Nov 10, 2011 12:51 pm
Has thanked: 2 times
Contact:

Re: MIAC Debugging

Post 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

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: MIAC Debugging

Post by petesmart »

Thanks for letting me know..this was a joint effort...thanks also to Martin!

Best regards

Pete
sorry about that Chief!

Post Reply