09-10-2008 01:43 PM
I have a C-RIO with a NI-9871 RS-485 Serial module that I am trying to setup to communicate with remote data acquisition devices through Modbus RTU. Has anyone been able to accomplish this? Does anyone know of any modbus VIs that are specific to the FPGA that take care of structuring the data for a modbus read or write request? I have been trying to develop these communication VIs without success. Any help or examples would be a tremendous help.
Thanks,
Dan
09-11-2008 03:28 PM
Hi Dan,
I don't think we have anything that can do that. There is a Modbus library, but will require a VISA resource, while the 9871 requires you to go through the FPGA rather than VISA. Hopefully someone else may have already done this, but otherwise you might have to write your own code. If you do have to write your own, I'd recommend you keep the FPGA interface as simple as possible to save space, and handle the protocol details on the realtime controller.
01-15-2009 08:42 AM
Hi D Reck,
I was wondering if you had any luck with the Modbus implementation using FPGA and a 9871. I am currently evaluating the use of cRIO for a PAC, but it will require communication with two Modbus slaves. I am not sure if this will be difficult hard coding into fpga. BTW, Does anyone know if this module (and RS485) is supported through the scan engine (scan mode) available to some cRIO platforms? That would definitely help in implementing the modbus protocol without having to hardcode through FPGA.
Gaussy
01-16-2009 11:37 AM
Hi,
Unfortunately none of the serial port modules are supported by scan mode at this time.
01-16-2009 12:37 PM
HI Jeremy_B,
Thanks for the reply. Would it be "difficult" to try and handle the Modbus communication through FPGA? I am relative newbie to the cRIO and FPGA platform, so I want to gauge if I'm "shooting for the stars" a little too early? I was hoping to find a rt controller that had an RS485 port built-in, but they only seem to handle RS232.
Thanks again.
Gaussy
01-19-2009
10:48 AM
- last edited on
05-13-2024
05:38 PM
by
Content Cleaner
Gaussy,
You could use the FPGA and serial module as a simple I/O passthrough and still do the Modbus encoding/decoding on the RT side using the existing libraries/VIs available on DevZone.
https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Modbus-API/ta-p/3524019
That attached example is an illustration on how to pass data bytes to and from the serial port on the C series module using the DMAs between the RT and FPGA. The example is just to get you started and does not do a lot of error checking or other possibly desired features.
01-20-2009 07:20 AM
Hi Christian L,
Great! This will definitely provide a starting point. I figured that scan mode would be able to read the buffers on the 9871, but I guess that be in future software updates. I definitely can't wait for that!
Thanks again,
Gaussy