LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/write network shared variables with Matlab

Hello,

I am reading and writing registers from various slaves with a CRio using Modbus TCP/IP. Is it possible to read and write these registers over the Network using Matlab 2018a?

 

Best

 

SR89

0 Kudos
Message 1 of 4
(2,498 Views)

Hi SR89,

 

Are you configuring a host computer to be the Modbus I/O master? Are you wanting to host the registers as shared variables on the cRIO?

 

Can you give a little clearer picture of how your system is set up and how you are expecting information to be passed between the different devices?

 

There is Mathworks Modbus communication documentation on their website. 

 

Here is our documentation for modbus:

 

Modbus Communication Using LabVIEW or LabVIEW Real-Time Module

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LReSAM

 

Note that depending on which features you need, you may require the DSC module

0 Kudos
Message 2 of 4
(2,460 Views)

Hi TyVo,

thanks for your reply. The Modbus Master is a CRio which makes queries towards various Modbus slaves via Modbus TCP/IP (I/O servers and Modbus Library). Some variables which are read by the CRio have to be communicated to my PC in order to be processed by Matlab 2018a. I am looking for a way to communicate these variables to my PC. The DSC module is available for us.

Regards

SR89

0 Kudos
Message 3 of 4
(2,449 Views)

Hi SR89,

 

It sounds like you just want to know how to communicate variables between your cRIO and Host computer.

 

This example shows very simply how to use network published shared variables between the two:

Basic Real-Time Network Communication Using Shared Variables

 

Here are some more resources and related links in case that isn't quite what you're looking for:

Understanding Communication Options Between the Windows HMI, RT Processor, and FPGA

Using the LabVIEW Shared Variable

Getting Started with the LabVIEW Datalogging and Supervisory Control Module

 

Best,

TyVo

0 Kudos
Message 4 of 4
(2,440 Views)