0

I am using LabVIEW to connect to Arduino Mega. I control a logic gate to switch the current On/Off and at the same time there is an I2C connection with a sensor. It came to my attention that the sensor time resolution is very low and I cannot get enough data points from the sensor (I know that the sensor is capable of much better resolutions). My question, is this a problem inherent to LabVIEW and Linx module or my program in LabVIEW? Should I turn to coding with Arduino programming language or C? note! My reason for using LabVIEW is that I need to sync timing of data aqcuisition with another device which is connected through another VISA port.

1
  • As far as I know, VIs are kind of compiled into c/c++ under the hood. It might help us if we could see your LabVIEW program and know which sensor it is. How do you connect to the arduino? I2c as well?
    – Sim Son
    Commented Jun 8, 2019 at 21:17

1 Answer 1

0

For specific timing requirements, my recommendation is to write your own Arduino code.

The Linx module deploys its own ino program to the Arduino and uses serial IO to send it commands and receive data from it. Open NI I/O Trace to observe that traffic.

1
  • Thanks for the answer, I exactly did that. Linx communicate every command to the arduino and wait for the answer, the loop frequency with linx drops as the linx blocks increases in the loop. it droped to 10Hz for me. I am now using the arduino code and send the data back to labview using serial communication. Its much faster (Up to 300Hz loop frequency).
    – user17830
    Commented Jul 2, 2019 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.