LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moxa Serial server device accessibility with NI CRIO 9038

Hi everyone,

 

I want to access Ethernet output of my 16 port serial server device from NI cRIO 9038? Can I do it directly? or will I have to use some other module for it?

0 Kudos
Message 1 of 7
(2,228 Views)

@Zaman123 wrote:

Hi everyone,

 

I want to access Ethernet output of my 16 port serial server device from NI cRIO 9038? Can I do it directly? or will I have to use some other module for it?


Not sure I understand this. Are you wanting to use the 16 serial ports from your cRIO device as serial ports through Ethernet, or are you trying to use the Ethernet port from that device through one of the serial ports connected to a serial port to your cRIO? The way you write, it sounds more like the latter, but I would think the first makes more sense.

The second would be likely impossible to do, since the Moxa Device does not provide such functionality, the first is complicated to do since there needs to be a device driver in the OS that connects to the Moxa and communicates with the serial ports and translates those data streams into virtual serial ports on your computer or cRIO. Now most Moxa devices do have Linux support, BUT the cRIO 9038 is using NI Linux RT, which is not exactly your standard Ubuntu or Redhat Linux distribution. So it is not guaranteed that their Linux driver would work on the cRIO. In any case installation of their driver may be complicated and it may be hard to get specific support from Moxa for this, but I have no experience with that.

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

"Access Ethernet output" is a bit unclear as already pointed out by rolfk.

However, like him, I guess you need to access MOXA serial ports from the cRIO.

If the MOXA operation mode is set as TCP server, you only need to use TCP functions (Open Connection, Read, Write), no additional module. Of course, you will not be able to set serial ports parameters this way (baud rate, parity, etc.).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 7
(2,177 Views)

Hi,

 

Thanks for your reply. I am actually giving my serial data RS422 to Moxa serial server device and it is giving me output in ethernet packet (udp protocol). Now, I just want to read this ethernet packet on CRIO 9038 controller use in my FPGA code. So could I do this?

Moreover, the datasheet for moxa serial server device is also attached.

 

0 Kudos
Message 4 of 7
(2,147 Views)

Hi Zaman,

 


@Zaman123 wrote:

I just want to read this ethernet packet on CRIO 9038 controller use in my FPGA code. So could I do this?


You can read the UDP messages in the RT part of your cRIO, then send the message content to your FPGA for further processing…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(2,144 Views)

Thanks you so much for your reply. So, will I have to write 2 codes? One in RT for receiving ethernet packets and another one in FPGA?

Could you please help me out in receiving the udp messages on RT? What code should I write in my RT to implement reception of udp messages?

 

TIA

0 Kudos
Message 6 of 7
(2,123 Views)

Hi Zaman,

 


@Zaman123 wrote:

So, will I have to write 2 codes? One in RT for receiving ethernet packets and another one in FPGA?


You wrote in a previous message you want to process the data "in your FPGA code", so the answer is "Yes, you have to write code for RT and FPGA!"…

 


@Zaman123 wrote:

Could you please help me out in receiving the udp messages on RT? What code should I write in my RT to implement reception of udp messages?


Open the example finder, then look for the UDP example VIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,120 Views)