Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing Labview with Teensy 4.0

Solved!
Go to solution

Hi,

I have recently started a project in which I need to use a Teensy 4.0 board. Because I am familiar with Labview and not much with Arduino, I thought I could try to use Labview. I want to develop some code for sending signals and reading data from sensors.

 

I installed the LINX package from MakerHub, but the Teensy 4.0 is not listed and I am not sure if I need to adapt something for the 4.0 or there is something already available.

 

Can anyone help?

 

Thank you in advance!!

0 Kudos
Message 1 of 9
(4,449 Views)
Solution
Accepted by massic76

Hey massic76,

 

have you tried this tutorial?

 

https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:misc:porting_device

 

this may help you adding new hardware to LINX.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 2 of 9
(4,363 Views)

Hi Jorge,

 

Thank you very much! I will definitely take a look at that tutorial. I didn't know about it.

 

I will report back once I try it and see if I am successful.

 

Best, Massimo

0 Kudos
Message 3 of 9
(4,360 Views)

just a heads up, 

 

i don't know the reason that you need to use Teensy 4.0.

 

As far as i understand, it is a very powerful hardware.

 

However LINX may slow it down in terms of using visa connection and other functions to read/write signals. 

 

 

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 4 of 9
(4,358 Views)

Hi Jorge,

 

Yes, you are totally right. I have thought of that. I have seen a comment about this in another post and it make sense.

 

We are using the Teensy 4.0 to control a motor for actuation of an exoskeleton. I need to send command signals and do readouts of the sensors that come with the motor. We also have a combination of analog and digital sensors that we want to monitor for proper actuation of the system.

 

After reading that post and also based on your last comment, I may try to program the Teensy 4.0 and test the correct operation and maybe use Labview to start and stop and collect data with a GUI.

 

If you have any other thoughts or comment, please feel free to share them!

 

Thank you for the help so far.

 

Massimo

0 Kudos
Message 5 of 9
(4,356 Views)

oh well, then i'll share an experience i had.

 

I needed to acquire an 1kHz signal with these development cheap boards. as you may know, it is very hard for such hardware make such acquisition and aditionaly deal with communication and so on.

 

Our solution:

Arduino Due acquiring data <--> serial low level communication (point to point, very fast) with ESP 32
ESP32 gets data, build an 400 position array, sends over TCP to a listener in LabVIEW.

 

even though we didn't use LINX, it was a very good experience.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 6 of 9
(4,351 Views)

Hi Jorge,

 

Sorry for the late reply. Thank you for sharing your experience. I will look into the setup that you shared and see if we can go with such solution.

 

It seems that your solution worked quite well.

 

Best, Massimo

0 Kudos
Message 7 of 9
(4,317 Views)

Hello everyone,

 

Jorge helped me by suggesting a post on how to add LINX support for the teensy 4.0.

The link he provided is: https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:misc:porting_device

 

I have been working on the list of changes to be made to the .cpp and .h files for the libraries.

 

However, I tried to find some information about the Teensy 4.0, but I am not sure what I should put for the following variables/definitions. If any of you knows what I should put for these variables/settings it would be great. Thank you in advance.

 

  • Number of SPI Speeds: Update NUM_SPI_SPEEDS with the number of supported SPI clock rates.

    I am not sure about the SPI Speeds because it seems that both ARDUINO (https://www.arduino.cc/en/reference/SPI) and Teensy (https://www.pjrc.com/teensy/td_libs_SPI.html) recommend not to use SPI Speeds definitions and dividers. They seem to recommend to use SPISettings with SPI.beginTransaction() to configure SPI parameters. In this case, I am not sure how to adapt the sample .cc and .h files.
  • Number of UART Channels: Update NUM_UART_CHANS with the number of UART channels on the device.
  • Number of UART Speeds: Update NUM_UART_SPEEDS with the number of supported UART baud rates.

Also in the Config.h I am not sure about these changes:

  • Set the device family code

    What is the family code for the Teensy 4.0? Where can I find it?
  • Set the ARDUINO_VERSION to match the IDE version used to build the firmware. This is used to deal with some API changes in the different wiring versions.

    For the Teensy 3.0 and 3.1 the version was set to 105. I currently have the 1.8.15, do I need to put something related to this or just leave the 105?

Thank you in advance for your attention to this post and for your assistance.

 

Best, Massimo.

0 Kudos
Message 8 of 9
(4,201 Views)

Massimo

 

Did you have any success in porting Linx to Teensy 4.0 ? I'm also trying to use but no luck. 

0 Kudos
Message 9 of 9
(636 Views)