Jump to content

Serial Communication in myrio


Ravinath

Recommended Posts

Hye.Im trying to connect GD02Rev2.0 (driver for the g15 cube servo) with myRio. I have to connect the Rx Tx and Control pin of the driver to the myRio to run the motor. It seems like i have to create serial communication in labview.Can anyone help me on this.thanks.The driver looks like below:

G15 Driver.png

Link to comment

Oh there are plenty of USB to Serial converters that will show up and work and you can use them using the standard VISA calls.  There are also UART TX and RX converters to RS-232 like the MAX232 or the one you linked to.  But is your device actually RS-232 serial?  I'm not so certain but again I've never used that hardware.  Read up on the documentation.  Either way you can come up with something that works.

Link to comment
5 minutes ago, hooovahh said:

Oh there are plenty of USB to Serial converters that will show up and work and you can use them using the standard VISA calls.

From the one project I had with a myRIO I think some USB cameras will work and I think I got a usb to ethernet device to work without installing drivers. I would be surprised if a regular USB to Serial converter would work out of the box on a myRIO, but is theoretically possible.

Link to comment

This advice is based on the fact that other Linux RT devices enumerate USB to Serial converters without any additional work.

https://forums.ni.com/t5/NI-Linux-Real-Time-Documents/USB-Devices-tested-on-NI-Linux-RT-myRIO-cRIO-9068/ta-p/3522002

Every USB to serial converter I've tried has worked in my 9134 (mix of Prolific and FTDI).  I've also seen posts where people talk about plugging in Arduinos to a MyRIO which enumerated as a VISA device, but again I have no experience with this.

Link to comment
14 hours ago, hooovahh said:

This advice is based on the fact that other Linux RT devices enumerate USB to Serial converters without any additional work.

https://forums.ni.com/t5/NI-Linux-Real-Time-Documents/USB-Devices-tested-on-NI-Linux-RT-myRIO-cRIO-9068/ta-p/3522002

Every USB to serial converter I've tried has worked in my 9134 (mix of Prolific and FTDI).  I've also seen posts where people talk about plugging in Arduinos to a MyRIO which enumerated as a VISA device, but again I have no experience with this.

Depending on the LabVIEW realtime version used it may be necessary to add an extra configuration file to the system (this is for Linux based cRIOs but should be the same for myRIO):

For FTDI based devices this usually seems to work out of the box, but your mileage may vary depending on the USB vendor and product IDs used by the manufacturer of the device.

But the NI Linux realtime kernel has additional drivers to support other adapters too. The first check is to run lsmod from a command line on the controller (you know what SSH is, don't you) to see what module drivers are currently loaded. First run it before the adapter is plugged in after a full reset of the system and then after plugging in the adapter. There should be at least one new driver module loaded which has usbserial as parent. If this already fails the adapter is not recognized by the Linux USB subsystem.

Once lsmod has shown a driver to be loaded make sure the adapter is plugged in and then look for /dev/ttyUSB devices by entering ls -l /dev/ttyUSB* on the command line. This should give a listing similar to:

crw-rw-rw-      1      admin     tty         188,        1 Oct 28 02:43  /dev/ttyUSB0

Important here is that at least the first two rw- are present and that the group (after the admin owner) is set to tty.

If VISA recognizes the port but lists it as Not Present one of these settings is most likely wrong.

To change the permissions with which a specific device is mounted by the kernel device discovery subsystem there are two different methods depending on which Linux kernel version is used.

NI Linux Realtime 2013

This uses the old mdev system to add dynamic devices.

Make sure to add following line to /etc/mdev.conf

ttyUSB[0-9]*    root:tty     666

Possibly the root entry should be replaced by whatever the login name of the administrative account is on that system (admin).

NI Linux Realtime 2014 (and supposedly newer)

This uses the newer udev system to add dynamic devices.

Create a text file with the name ttyUSB.rules with following contents:

KERNEL=="ttyUSB[0-9]*", GROUP="tty", MODE="666"

Add this file into this directory: /etc/udev/rules.d

 

 

  • Like 1
Link to comment
On 1/18/2018 at 1:49 AM, Jordan Kuehn said:

Have you tried using the UART lines on the myRIO in conjunction with the express vi?

If that doesn't work (it should) you could attempt to install linux drivers for a USB to Serial converter on the myRIO. Good luck though.

 

UART means to connect the Tx and Rx.but how about the control pin?can you get me any examples to create the vi in labview?thanks

Link to comment
  • 2 weeks later...
  • 2 weeks later...
On 1/18/2018 at 1:49 AM, Jordan Kuehn said:

Have you tried using the UART lines on the myRIO in conjunction with the express vi?

If that doesn't work (it should) you could attempt to install linux drivers for a USB to Serial converter on the myRIO. Good luck though.

 

On 2/2/2018 at 4:24 AM, infinitenothing said:

Have you tried the express VI? It looks like you don't need a shifter.

 

hye i have the arduino coding to run the servo motor.can you know how to convert it into the labview software?thanks

Screenshot 2018-02-11 19.18.29.png

Link to comment
  • 3 weeks later...
On 2/11/2018 at 7:21 PM, Ravinath said:

hye i have the arduino coding to run the servo motor.can you know how to convert it into the labview software?thanks

 

On 3/3/2018 at 5:33 PM, Ravinath said:

can help me on this construction? i have created the serial communication in labview as below.but im not sure whether the the construction for the control pin is correct or not.by the way i want to run the g15 cube servo with gd02 rev 2.0 driver.

 

Please understand: All of this is a lot of work! It can take several days of full-time work to finish. It is not reasonable to expect people on this forum to do your work for free.

Someone needs to read through the data sheets. They might need to reverse-engineer the Cyton G15 shield hardware and/or code. Then, they need to make wires between the myRIO and the GD02, and make wires between the GD02 and the servo. They also need to write software for the myRIO to communicate with the GD02. Finally, they need to test everything.

You should either hire someone to teach you how to do all of this, or hire someone to do it for you.

Link to comment
7 hours ago, JKSH said:

 

 

Please understand: All of this is a lot of work! It can take several days of full-time work to finish. It is not reasonable to expect people on this forum to do your work for free.

Someone needs to read through the data sheets. They might need to reverse-engineer the Cyton G15 shield hardware and/or code. Then, they need to make wires between the myRIO and the GD02, and make wires between the GD02 and the servo. They also need to write software for the myRIO to communicate with the GD02. Finally, they need to test everything.

You should either hire someone to teach you how to do all of this, or hire someone to do it for you.

anyway thanks sir.i will try my best

Link to comment
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.