MIAC and LabView

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

Moderators: Benj, Mods

Post Reply
go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

MIAC and LabView

Post by go233 »

Hello,
can labview and MIAC talk to each other?
could you explain how?
I have got:
Labview 2015
Flowcode 6
MIAC MI0235
Thanks
Giovanni

P.S.
I found on the attached pdf that they are compatible
Attachments
MIAC-operation-and-programming-guide.pdf
(2.82 MiB) Downloaded 716 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: MIAC and LabView

Post by kersing »

Have you checked this example?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

Thank you.
I have checked and it is seems possible.
There is a Labview error in the all examples I have run, but I haven't followed the procedure described in the wiki.
I bought a MIAC when it arrives I'll give it a try and I'll report to the forum.
Giovanni
8)

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: MIAC and LabView

Post by Benj »

Hi Giovanni,

What errors is Labview giving you. I think in later versions of Labview they changed the DLL library call slightly so the examples may need a slight tickle to work. If you can open up the block diagram with the error then it might help to highlight what you need to do to solve the problem.

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

Hi,
when I load the example 1 in labview I have got errors 1 (see attached picture)
all error in error1 points to the fact the subVI USB transfer is broken (see error in subVI USB_transfer)
In fact it points out that the Call Library Function Node is broken.
I think the dll needs to be re-compiled as you said?

How do I re-compile the dll?

If I understand my labView program run on the PC and then I connect the MIAC to the USB port and I talk to it?

Thanks
Giovanni
Attachments
LabView version.png
(148.73 KiB) Downloaded 10283 times
error in USB_Transfer.png
(134.34 KiB) Downloaded 4434 times
error1.png
(76.33 KiB) Downloaded 4434 times

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

..ah I forgot to ask.

the USB driver I need to install for the MIAC to work with flowcode in the standard way is it different
from the one that needs to installed for MIAC working in USB slave mode? (USB Slave Firmware.zip)
Sorry I am a bit confused.com!

Giovanni

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: MIAC and LabView

Post by Benj »

Hi Giovanni,

The MIAC USB Slave firmware and USB driver can be found here in the zip file.

http://www.matrixtsl.com/wiki/index.php ... 51d675a9e7

The DLL does not need re-compiling. It is as Labview says, one of the wires is unconnected, I'm guessing previously the wire was optional where as now it is mandatory. If you double click the error then does it take you to the icon on the block diagram with the problem? It should simply be a case of finding the unconnected node on the block in question and wiring in a constant.

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

I have done it, I have connected all the terminals and now and LabView is happy to run the examples.
However, I have to wait for my MIAC to show up to test it.
I'll report the outcome.....
Giovanni

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

Hi,
I have received the MIAC and now I have just working to the connection of the MIAC with LabView.

You say I have to re-program the MIAC a file MIAC USB Slave v6 with the MIACprog tool.

Unfortunately, it does not suit me, in fact the MIAC is completely dependent from the LabView Code running on my PC and giving orders and receiving data from the MIAC through the USB.

I wanted to have the option to the customer to run the MIAC independent and also controlled to the LabVie.

So I am going to try to run a communication between PC and MIAC using a RS232? If I use a MAX2323 or I buy a EB015 than I connect the TX to Q4 and RX to I8 than I connect to the PC and I make LabView sending Text via RS232?
What do you say? Is it a too much convoluted via to follow?

Giovanni

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: MIAC and LabView

Post by EtsDriver »

You could use the USB_Serial component in FCv6/v7 so you could use USB part of MIAC directly. This way you save some IO for other things and take advantage of the USB. :)
Ill just keep the good work up!

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

Good and Bad news.

I have loaded the SLAVE USB driver you have sent to me and also I have compiled and flashed the MIAC code you have sent to me into the MIAC.

Then, I have tried the labview example1 (I have downloaded from the link you sent to me) and it works!

Allelulia.

To re-write everything using the USB to make the LabView and MIAC talking to each other (with the MIAC NOT in slave mode) takes time which I don't have....maybe later.

Giovanni

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: MIAC and LabView

Post by go233 »

Hi, I would appreciate a bit of help with this labview examples in here
http://www.matrixtsl.com/wiki/index.php ... ng_Labview

I am trying to control the MIAC in slave mode using labview and I find the following points to clarify:
command 4 and 5: how do I use the the USB transfer VI to read which button has been pressed in the keypad?
command number 11: don't understand number low byte and number high byte in relation of the USB transfer VI ? how do I pass the parameters to the functions? say I want to send 123 or 34.789 how do I do that?
command number 12: it seems that that the USB transfer VI does not have any input terminal for a string?
command 19 and 20: it is the same of command 11: how do I send this CAN command over?
command 24: what is a register? what are the information I can write inr or read from?



Thanks
Giovanni

Post Reply