LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA BASE for Arduino error

Hey guys,

i have a problem with the interface LIFA on the arduino board. We have a bigger projekt about a breacking wheel test and have to use the arduino with an older Labview project to recieve the datas from a torque sensor. This program was written with the LIFA BASE on the arduino. I've tried to use LINX but it doesn't work.

So i wanted to use the LIFA BASE but the follow error occurred:

Arduino: 1.6.4 (Windows 8.1), Platine: "Arduino Uno"

G:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope

int RECV_PIN = TKD2; // the pin the IR receiver is connected to

                ^

Fehler beim Kompilieren.

Can anyone help me.

Thanks a lot.

Eduard

0 Kudos
Message 1 of 21
(6,291 Views)

LIFA is no longer supported and will not work on up-to-date versions of the Arduino IDE. The best thing to do is to figure out why LINX isn't working.  For that, you can post on the LINX forums (http://www.labviewmakerhub.com/forums).

If you really have to use LIFA, you will need to downgrade your Arduino IDE to version 1.0.5.

0 Kudos
Message 2 of 21
(2,390 Views)

Hi Nathan,

     I am now trying to design a labview program for four stepper motor to move at the same time. I am using LIFA now, becasue I didn't see any sub VIs for stepper motor on LINX. So LINX doesn't have sub VIs for stepper motor, or I didn't find it the right way?

0 Kudos
Message 3 of 21
(2,390 Views)

LIFA only has the capability to drive one Easy Driver stepper motor at one time.  LIFA can not drive multiple stepper motors simultaneously.  Some alternate approaches are:

Dont use LIFA and instead use code provided by Brian Schmalz for driving multiple Easy driver stepper motors simultaneously. See example 4 at the following web page.

<https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=arduino%20multiple%20st...>

Notice Brian says you will not get smooth motion when driving multiple stepper motors when using an Arduino Uno. Instead Brian recommends a chipKit.

A Sparkfun Quad stepper board.

<ps://www.sparkfun.com/products/10507>

Requires an Arduino Mega.

If you have a CNC application Look at using GRBL software.

<https://github.com/grbl/grbl/wiki>

hrh212

Message 4 of 21
(2,390 Views)

Hi hrr 212

Thank you for your advises.

Now I have one labview code working for one stepper motor, do you think it's possible for me to use four arduino board to run the program at the same time to make four motors move?

Thank you for your help.

0 Kudos
Message 5 of 21
(2,390 Views)

Yes it is possible to use 4 Arduino boards with one stepper motor and driver connected to each Arduno board.

For controlling the 4 Arduino boards you need to use the serial interface capabilities of Labview.  Your Labview VI will have 4 serial ports.  You can't use LIFA as blocking prevents simultaneous operation.

hrh212

Message 6 of 21
(2,390 Views)

hrh 212,

     Sorry I am new to labview and arduino, I am not completly sure about what you mean. My situation is that I need to use the stepper motor to stretch my sample, and use load cell to measuring the force added to the sample, then get the force data. Someone use LIFA designed a program already for one motor and one load cell. Now I need to make a program four stepper motors to work at the same time so I can test more samples.

     You mentioned LIFA doesn't support simultaneous operation, do you mean I can't use the code I have now, and I need to rewrite one using LINX?

    

     Thank you for your help

0 Kudos
Message 7 of 21
(2,390 Views)

Liu9079 wrote:

     You mentioned LIFA doesn't support simultaneous operation, do you mean I can't use the code I have now, and I need to rewrite one using LINX?

You can actually run as many Arduinos simultaneously as you want using LIFA or LINX.  There is nothing preventing this from happening (I've done it personally).  You simply need to have 4 independent instances of LIFA/LINX in LabVIEW (i.e. 4 Init.vi with different COM ports).  Just be sure to keep track of the 4 individual LIFA/LINX resource wires and make sure to close all 4 of them.

The only caveat is making sure that the physical boards are properly correlated to each of the instances in LabVIEW (e.g. board 1 is always on COM1, board 2 is always on COM2, etc.) if order matters.  When I did it, I customized the firmware for each board to be able to return an ID.  I wouldn't recommend this approach because it is really easy to accidentally upload the same ID to both boards.

One alternative is to use a couple digital pins to identify each board.  To uniquely identify 4 boards, you would only need two digital pins and treat them as a 2 bit number.  2 bits gets you values 0, 1, 2, and 3.  You would connect each pin to 5V (3.3V on some boards) or ground to represent 1 and 0, respectively.

Message 8 of 21
(2,390 Views)

There is a big difference between moving 4 stepper motors at the same time and using 4 Arduino boards at the same time.  With 4 Arduino boards and a stepper motor connected to each board you will be limited to sequential operation of the stepper motors.   Instead of trying to run all 4 test stands at the same time you could run one or two test stands and while data is being collected from the running test stands load new sample into the other test stands.  Hence the LIFA program would have the capability to collect data from 4 different test stands and use front panel controls for selecting which test stand to run.  

hrh212

Message 9 of 21
(2,390 Views)

I got a new problem now. I checked the block diagram, and it is messed up, I can't see part of it, which include arduino INIT and arduino configure. I am using labview 2014 with windows 7, and the program was designed with labview 2013. should I change my labview to 2013 to solve the problem?

Thank you

0 Kudos
Message 10 of 21
(2,390 Views)