LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use ethernet port on sbRIO to communicate with another device

Solved!
Go to solution

Hi,

 

I have servo drive which I am commanding and controlling using VISA VIs. Currently I am using Ethernet port on the Host PC to establish the communication and it works.

 

I was wondering if I can use Ethernet port on the sbRIO-9638 and control the drive system. Currently when I attempted to use the same working VI on RT side (dum dum approach) , I got error -1073807343 (VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.

This is how the resource name is built: (default VISA resource names on RT side are ASLR 1,2,3)

Xonmyth743_0-1621441714535.png

Resultant string is then type-casted- into visa resource.

 

I am trying to understand how TCP/IP and VISA VIs work at the first place but since I am in a time crunch situation I thought of asking this half baked question, that is it even possible to use Ethernet port on sbRIO-9638 to communicate with an external device? Like a drive system in my case.

 

If yes, I would appreciate if someone can head me in the right direction for this.

If no, I will resume working on the PC side.

 

Thanking you for your time.

0 Kudos
Message 1 of 13
(1,915 Views)
Solution
Accepted by topic author XM43

Hi Xonmyth,

 

have you tried to use the "default" TCP functions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(1,886 Views)

Hi GerdW,

No, I have not. But I will try that now.

 

Thank you.

0 Kudos
Message 3 of 13
(1,878 Views)

Hi Xonmyth,

 

using TCP functions I could use basically the same driver for a stepper motor controller on a cRIO as is used on a Windows computer…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(1,874 Views)

Hi,

 

yes, this should work, but you have to:

- run your VI on the sbRIO

- install the software/driver package VISA with ENET support on the sbRIO

 

Regards, Jens

 

 

Kudos are welcome...
0 Kudos
Message 5 of 13
(1,872 Views)

Hi GerdW,

 


using TCP functions I could use basically the same driver for a stepper motor controller on a cRIO as is used on a Windows computer…


TCP functions did not work for me.

 

I'm sorry I forgot to mention one key factor 😬 that the drive actually uses Telnet protocol. Similar to Putty, I am not sure what impact that as on application of TCP functions as is.

0 Kudos
Message 6 of 13
(1,851 Views)

Hi Jens,

 


- install the software/driver package VISA with ENET support on the sbRIO


Your suggestion did help a bit since now I am not getting error while trying to establish a connection or while sending data but receiving data is not working.

 

Below is what all drivers I have installed on the sbRIO:

Xonmyth743_0-1621454239328.png

 

0 Kudos
Message 7 of 13
(1,849 Views)

@XM43 wrote:

Hi Jens,

 


- install the software/driver package VISA with ENET support on the sbRIO


Your suggestion did help a bit since now I am not getting error while trying to establish a connection or while sending data but receiving data is not working.

 


Hi,

 

then you should show us more of your code. Up to now we only now how you build the TCIPIP VISA string, but nothing else. I would suspect some differences for VISA read (perhaps the termination char) because of the different operating systems (sbRIO = Linux).

 

Regards, Jens

 

EDIT: Telnet is more or less just an TCP/IP protocol on port 23 and some specific end characters.
If you have an active SSP, you can ask NI about the old Internet toolkit, that has a VI palette for telnet:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6WYSA0

Kudos are welcome...
0 Kudos
Message 8 of 13
(1,840 Views)

@JensG69 wrote:

@XM43 wrote:

Hi Jens,

 


- install the software/driver package VISA with ENET support on the sbRIO


Your suggestion did help a bit since now I am not getting error while trying to establish a connection or while sending data but receiving data is not working.

 


Hi,

 

then you should show us more of your code. Up to now we only now how you build the TCIPIP VISA string, but nothing else. I would suspect some differences for VISA read (perhaps the termination char) because of the different operating systems (sbRIO = Linux).

 

Regards, Jens

 

EDIT: Telnet is more or less just an TCP/IP protocol on port 23 and some specific end characters.
If you have an active SSP, you can ask NI about the old Internet toolkit, that has a VI palette for telnet:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6WYSA0


Sorry anxiety makes me extra dumb forgot to add the code. I am attaching the code here. It might require a password which I am sending to you in personal mail. Hope you do not mind that.

 

Edit: GredW, would you be interested in looking into the file? Is it okay if I send you password in a private message.

0 Kudos
Message 9 of 13
(1,834 Views)

Hi GerdW,

 


have you tried to use the "default" TCP functions?


Sorry, I need to correct my previous statement. I just now used "default" TCP functions on Windows PC (using LabView) and it worked. Drive responds as expected.

 

Then I tried the same VI on RT side, it did not give any error when attempted to Connect and Write. But it gives timeout error when attempted to read the data. Similar behavior to my previous VI using VISA resources. I tried using longer timeout periods but the error exists.

 

I am attaching a VI (no password), I would really appreciate if you could indicate what I might be doing wrong.

 

Thanking you for your time.

0 Kudos
Message 10 of 13
(1,809 Views)