Matrix labView user example can't open USB [Solved]

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Matrix labView user example can't open USB [Solved]

Post by QMESAR »

After all the other issue I had I am on the next one :oops:
my USB device now shows up in the device manager as Flowcode USB Slave
2.png
(13.84 KiB) Downloaded 2829 times
The driver show the VID as 12BF and the PID as F030( hex numbers) which is the Default Flowcode VID 4799 and PID 61488
1.png
(69.55 KiB) Downloaded 2829 times
I set the PID and VID in labVIEW in the open USB sequence structure
3.png
(10.86 KiB) Downloaded 2829 times
Running the VI in Debug mode it shows the Open USB VI always return 0 any idea what I can do or should will be highly apprecaited
4.png
(26.31 KiB) Downloaded 2829 times

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: Matrix labview user example can't open USB

Post by Benj »

Hello Peter,

Please can you check that the "ECIO_api.dll" file is in the same directory as your Labview project .vi file.

It may be the DLL function is being called correctly but cannot be found?

I have some more examples here but they are pretty old now so potentially something could have changed in more recent versions of Labview.
Examples.zip
(3.45 MiB) Downloaded 202 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labview user example can't open USB

Post by QMESAR »

Hi Ben,
I am so sorry about this :oops:
The dll is in the same directory with the sub Vi as well.
I will look at your other examples.
1.jpg
1.jpg (46.71 KiB) Viewed 5581 times
Thanks a million for all your efforts

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labview user example can't open USB

Post by QMESAR »

Hi Ben

Tried the other examples no luck
Are we sure the driver is in the correct place as in the wiki it says the driver should show up under Custom devices and with me it shows under USB devices.?
If this is not the problem then it seams there is a problem between labVIEW and the dll it is all conclusion a non expert can make :oops:

I really appreciate your efforts to help thanks a million Ben

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: Matrix labview user example can't open USB

Post by Benj »

What version of Labview are you running and I'll see if I can get hold of a trial copy and put together a quick test.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labview user example can't open USB

Post by QMESAR »

Hi Ben
I am running labView 2014 SPI
I really appreciate all of this but I think if you get 2017 and it work in there it should work in 2014
Ben the transfer sub Vi also has an issue there are wires not connected, I connected them and the broken run arrow disappears however while you are looking at this please give the transfer sub Vi a peak too :D
You guys should use the cheap maker hub version 50 dollars for 2014 you just do development examples no commercial use for you :D

https://www.labviewmakerhub.com/ :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labView user example can't open USB

Post by QMESAR »

Hi Ben.
After working a few more hours with this it seams there is a confusion with the VID and PID's in the drivers,
The MIAC when programming utility is used it used the 12BF and 0120 and it shows up in the Custom Devices.
when using the a PIC as a USB Slave the following is used 12BF and F030 ,

I have programed my MIAC with the MIAC as Slave Firmware from here http://www.matrixtsl.com/webshop/miac-controller.html
however I do not see the MIAC then in the device manager , and the supplied firmware FC project does not compile
I am just not sure where to start with all of this which driver which firmware to use to get the MIAC connected as a slave and run from LabVIEW,
MIAC USB Slave Flowcode Source.rar
(1008.27 KiB) Downloaded 202 times
Please help the old man to get some idea of what is going wrong here :D :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labView user example can't open USB

Post by QMESAR »

Hi Ben

Please stop to waste your time the issue is fixed ,LabVIEW is running fine now and the MIAC does what LabVIEW command him to do .

Findings
(1) there are different PID-VID settings for the USB Slave and the MIAC Slave Drivers how come I do not know however as showed above the different PID Values.Not sure if there is any other hidden strings/numbers to tell the driver that it is a MIAC or a Normal slave device? but they are different drivers to the look of it.
(2)The MAIC Slave Firmware Project(FC) downloaded from the MIAC product page does not compile
(3) Downloading the same sourec files from the FC6 MIAC Wiki compiles correctly ,I then programmed the MIAC with this hex file and it showed up in the device manager with the correct PID and VID as also used by the LabVIEW open USB Vi.
(4) fixing the unconnected wires in the LabVIEW Transfer subVi remove the broken run arrow in LabVIEW
(5) Running the LabVIEW examples are working fine now

However with all of this said in my opinion we still have non functioning USB Slave function or Drivers if I would connect now my PIC 18F4550 nothings works

Ben I really appreciate all your help and efforts really highly however I am on my way now doing what I should be doing .but I will be backin the near future with the Slave Component stuff for PIC :D
12.jpg
12.jpg (17.66 KiB) Viewed 5554 times
13.jpg
13.jpg (61.59 KiB) Viewed 5554 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labView user example can't open USB

Post by QMESAR »

Hi
Here is a working LabVIEW project for MIAC PIC (template)with the fixes as mentioned above for any one which encounter the problems I had
this is working fine just make sure to install the MIAC USB Slave Driver
Template.rar
(62.65 KiB) Downloaded 197 times
Also attached is the USB Salve Source code project that is working
MIAC USB Slave Flowcode Source.rar
(251.39 KiB) Downloaded 210 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Matrix labView user example can't open USB

Post by QMESAR »

QMESAR wrote: I will be back in the near future with the Slave Component stuff for PIC :D
Hi Ben I have managed to get my PIC18 to work as USB slave by setting the PID and VID values in the component properties to the values used by the MIAC.Now my PIC 18 show up as a MIAC Slave device in the device manager but it works I can send a byte and display it on the PORTB as in the MATRIX example .but when using the standard VID PID as set in the USB slave component in FC the device shows up as a MATRIX USB slave but I can not connect to it.
I am unsure what the Problem is however when it will not do any harm using the Miac driver then I guess it is ok unless you have some advise here :D :D

Post Reply