Teensy with Labview

Status
Not open for further replies.

mdaslam

Member
Hi

I've been using Teensy 3.1 for about a week now on my project and it has been great so far. I'm currently taking it to the next step and add a Labview interface. I managed to set up my Labview software to work with the Arduino and did a simple blinky test and it worked fine. I had to use the Labview for Arduino Interface library to get this working.

Now, I am trying to set up the Labview to work with the Teensy.

I followed the steps on this page : https://www.pjrc.com/teensy/languages.html

This modified Arduino code allows Teensy to work with LabVIEW's Arduino library.

I assume this is the same as the aforementioned library that is tweaked to work with the Teensy.

I extracted the file from the .zip and opened LVIFA_Base.ino. With my Teensy 3.1 connected, i tried to upload the .ino code but received the following error:

Screen Shot 2015-01-07 at 4.20.15 pm.png

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.5-r2 (Windows 7), Board: "Teensy 3.1"
AFMotor.cpp:94: error: #error "This chip is not supported!"
AFMotor.cpp:108: error: #error "This chip is not supported!"
AFMotor.cpp:125: error: #error "This chip is not supported!"
AFMotor.cpp:140: error: #error "This chip is not supported!"
AFMotor.cpp:158: error: #error "This chip is not supported!"
AFMotor.cpp:172: error: #error "This chip is not supported!"
AFMotor.cpp:192: error: #error "This chip is not supported!"
AFMotor.cpp:206: error: #error "This chip is not supported!"
In file included from AFMotor.cpp:13:0:
AFMotor.h:121: error: 'CS01' was not declared in this scope
AFMotor.cpp: In constructor 'AF_Stepper::AF_Stepper(uint16_t, uint8_t)':
AFMotor.cpp:310: error: 'CS20' was not declared in this scope

I've been stuck here for some time and can't find any way around this.

Any advice?

Thanks in advanced.
 
I just looked at this code again. It doesn't support Teensy 3.1.

You can still use ordinary USB serial with Labview, but you'll need to build code on the Labview side to receive whatever your code on Teensy sends. LVIFA simply isn't going to work on Teensy 3.1. It only works on the older Teensy 2.0 boards.

There was also a conflict with names in the AccelStepper library. I've updated the file names, so it should work again on Teensy 2.0, even when the AccelStepper library is present. But this does nothing for Teensy 3.1. :(
 
Just comment out #define STEPPER_SUPPORT 1 in LabVIEWInterface.h
and delete AccelStepper.h, AccelStepper.cpp, AFMotor.h, AFMotor.cpp?

Assuming you don't need stepper motors that is...
 
I just looked at this code again. It doesn't support Teensy 3.1.

You can still use ordinary USB serial with Labview, but you'll need to build code on the Labview side to receive whatever your code on Teensy sends. LVIFA simply isn't going to work on Teensy 3.1. It only works on the older Teensy 2.0 boards.

There was also a conflict with names in the AccelStepper library. I've updated the file names, so it should work again on Teensy 2.0, even when the AccelStepper library is present. But this does nothing for Teensy 3.1. :(

Oh no. Alright then.

In other words, Labview is compatible with Teensy but not via the LIFA package? Instead, I will have to build my own code on the Labview side?

Just comment out #define STEPPER_SUPPORT 1 in LabVIEWInterface.h
and delete AccelStepper.h, AccelStepper.cpp, AFMotor.h, AFMotor.cpp?

Assuming you don't need stepper motors that is...

Hi thanks for your assistance. I commented out those and deleted the files as you suggested. I managed to compile the code sucessfully. Thank you.

However, I'm unable to do further testing of the Teensy and Labview at the moment until I solve the issue mentioned above in this reply. I had a simple blink.vi (blinky equivalent) in Labview that worked with Arduino Uno via LIFA but as Paul said above, it won't work with the Teensy.
 
I can't see why LIFA wouldn't work with Teensy. I've just looked at the source code for LINX (the successor to LIFA) and can't see any reason why it wouldn't work as long as you select the correct COM port.

Have you tried it?
 
I can't see why LIFA wouldn't work with Teensy. I've just looked at the source code for LINX (the successor to LIFA) and can't see any reason why it wouldn't work as long as you select the correct COM port.

Have you tried it?

Sorry. So far all I've been able to try is to compile and upload the LIFA code via the Arduino/Teensyduino IDE.

I'm unable to actually implement/test anything within Labview as I don't have any Labview programs that can test. The only Labview program I have is Simple LED Example which was used to switch on/off an LED on via the Arduino. I'm really really new to Labview (not even knowing how to select the correct COM port). I looked at the block diagram and see 3 options for board in the init.vi : Uno, Mega 2560 and Dimuelanove w/Atmega328.

File is attached below. Not sure if the link will work though :/

https://www.dropbox.com/s/v9kbh22f1p0aafd/Simple LED Example.vi?dl=0
 
Status
Not open for further replies.
Back
Top