LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to connect Arduino uno with cRio(9074) where crio will be act as a master and arduino uno will be act as a slave?.

Hi all,

I'm new in labview.

I'm trying to connect Arduino uno (with BNO055) with CRIO 9074(real time). can you please help me how to make this connection possible?

currently I'm using labview 2011, in VI I have made this connection possible through labview visa interface, but in real time I'm not able to configure this.

Help me.

Thank You.

0 Kudos
Message 1 of 12
(2,066 Views)

Have you made sure that you have NI-ViSA installed onto the cRIO-9074? That is available and supported, also for VxWorks based realtime controllers, and you should be able to access the serial port on it through VISA. But don't try to use an RS-232 to USB converter on this. That is NOT supported as there are no RS-232 to USB converter manufacturers who provide a VxWorks device driver for their hardware. Not even NI supports their own USB-232 adapter under VxWorks. And they won't add that support anyhow now. All VxWorks (and Pharlap based) RT controllers are now definitely EOL. You can't purchase them anymore and there will be no software updates for them. LabVIEW 2020 and newer doesn't support them either.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 12
(2,045 Views)

 

Thank you for your valuable reply.

I have installed labview visa interface for 2011, but the issue is My program is providing output for simple Labview vi without any connection with cRio(9074) but when I try to connect arduino Uno board with cRio with the help of real time vi I didn't get any output.

kindly tell what to do?

0 Kudos
Message 3 of 12
(1,986 Views)

@dasabhijit wrote:

 

kindly tell what to do?


Post your VIs and an overview of how you connect things. From your description I pretty much only understand "Bahnhof".

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 12
(1,978 Views)

Hi,

thanks for your time.

Here I attach my vi file and there is also a bunny code in arduino. My issue is that my labview program is responding properly in VI but not responding in cRio 9074 (real time).

 

0 Kudos
Message 5 of 12
(1,964 Views)

Hi dasa,

 

where and how is the Arduino connected to?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(1,962 Views)

@dasabhijit wrote:

Hi,

thanks for your time.

Here I attach my vi file and there is also a bunny code in arduino. My issue is that my labview program is responding properly in VI but not responding in cRio 9074 (real time).

 


What is "bunny code"? Where is the diagram about how you connect your Arduino to the cRIO? What cable if any are you using? Or are you expecting those two devices to talk to each other through telepathy?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 12
(1,957 Views)

Hi,

Thing is that at first I have directly connected my BNO055 with cRio 9074(NI 9402), SCl is connected with DIO 0 and SDA is connected with DIO1. I am also connecting 3.3V and GND to the sensor's VDD and GND for achieving I2C communication. but unfortunately data is not acquired, on that purpose I have executed a particular code.

Due to the data is not acquiring, I am tried another method by the help of Arduino. Here I connected my BNO055 with arduino uno. BNO055 SCL IS connected with arduino uno's A5 and SDA is connected with arduino uno's A4 and BNO055's Vin is connected with 5v of arduino uno and both the GND are connected(I2C protocol). Now I run the particular BNO055 code in arduino ide software, and it is providing proper output which is showing in both serial monitor and plotter(COM).

Now I have written a visa code in labview vi(port com4) and it is properly acquiring the data in VI, but the major issue is when I try to code this in real time vi (cRio 9074) it's not responding.

Now i would like to know is it possible  to connect that BNO055 (with arduino uno) using CRIO 9074,where cRio act as a master and arduino uno as a slave or Is there any other way to communicate via BNO055 via arduino uno with cRio? 

 

0 Kudos
Message 8 of 12
(1,944 Views)

And how did you connect the Arduino to the cRIO????? That's what we have been asking all the time and you have always omitted that.

If you connected the Arduino through an RS-232 connection to the RS-232 Serial Port on the cRIO it should simply work if you used the correct cable (the cRIO uses RS-232 logic levels, the Arduino uses 5V or 3.3V TTL levels depending on the board you use, so you need a TTL to RS-232 level adapter or you could damage your Arduino board) and your Arduino software does handle the UART port on its connector. If you however used the USB connection then you have bad luck. The Arduino is providing a USB Virtual COM port over that link BUT the cRIO-907x chassis uses VxWorks as real-time OS and that does NOT support USB virtual COM ports of any kind, not even the USB-232 adapters that NI sells themselves!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 9 of 12
(1,933 Views)

Thank you sir for your valuable reply, it means a lot.

Now the issue is my arduino uno is not compatible with RS232 port, so I am trying to communicate BNO055 breakout board directly(without arduino) with cRIO-9074, using I2C protocol. For interfacing bno055 we are using NI-9402 module (DIO0-SCL and DIO1-SDA). I have written a program for both writing data to the slave and reading data from the slave. I have taken care of all the I2C protocols as per I2C specification sheet by NXP semiconductor UM10204. www.nxp.com/documents/user_manual/UM10204.pdf.  These are the steps that I have followed for multiple byte write/ read sequence.

1)      Start sequence (2) i2c address of BNO055(x28)+w with ack at the 9th clock pulse (3) Internal register address + data   (4) Restart the sequence  (5) i2c address +R  (6) Read Data byte (quaternion registers)  (7) Stop sequence

Here is the link for BNO055

 https://cdn-shop.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf

Now the issue is, cRIO is not communicating with BNO055 properly.

what to do?

0 Kudos
Message 10 of 12
(1,920 Views)