02-01-2011 09:24 AM
Thank you for the reply Steven T.
That's the example I'm using righ know to make this communication using my cRIO-9074 with NI 9871 module.
But when adapting this example for my hardware I got some errors and I can't make any communication.
The project where I made these changes are in the previews reply of this topic. If you could help me with this, I will thank you.
Best regards.
02-01-2011 11:26 AM
I'm now working on this project, taking the example given by Steven T.
I've made all the changes to the project to work with cRIO-9074 and NI 9871 module with no success.
My project is in attachment.
I hope that anyone with experiance in ModBus RS-485 could help me.
Thank you all.
02-02-2011 03:38 PM
Please be a little more explicit about what is going wrong.
1. Tell us about the symptoms you are seeing.
2. Is your VI able to run?
3. How long does it run?
4. What data is actually getting sent out of the port?
5. What data is actually getting received?
Thanks,
Steven T.
02-03-2011 04:12 AM
First of all. I started with this example:
http://zone.ni.com/devzone/cda/epd/p/id/6166
, that by the description, does exactly what I want, ie send a request to a device (Carlo Gavazzi) via ModBus RS-485, and waits for a reply from the device.
I've unzipped all the files to a folder and run the cRIO Modbus LabVIEW Project. Until here, everything was fine except the fact that the example uses the a cRIO-9104 with NI-9870.
Because I'm using the cRIO-9074 with NI-9871, I made a New / Target and Devices and added my cRIO-9074 to the project using LabVIEW FPGA Interface.
To place all the VIs in my device, I've dragged these files/folders from the other device to mine:
- NI Modbus - cRIO
- Low-level Serial VIs
- 4-port serial.vi
- READ_FIFO
- WRITE_FIFO
- cRIO Modbus Example (Host).vi
The files were placed in the same place under my new device, and the old device from the example deleted.
After that, when opennig the main VI: cRIO Modbus Example (Host).vi I started to correct the problems, adapting the example to my hardware, since the run button is broken.
I started to drag the 4-port serial.vi to the FPGA Target in Block Diagram. Under this VI, I need to change the FPGA I/O Method Node, from NI 9870 -1\Port1, 2, 3 and 4 to mine and here I had the first problem. When making right click and Add New FPGA I/O, the window just has two empty columns, no I/O can be selected at this point and I don't know why.
Since I can't add my devices I/Os to this VI, I get some broken link on the main VI.
I send you my entire project for some help. If you know I could I solve this problem, please let me know.
And once again, thank you for the support.
Quintino
02-03-2011 04:12 AM
First of all. I started with this example:
http://zone.ni.com/devzone/cda/epd/p/id/6166
, that by the description, does exactly what I want, ie send a request to a device (Carlo Gavazzi) via ModBus RS-485, and waits for a reply from the device.
I've unzipped all the files to a folder and run the cRIO Modbus LabVIEW Project. Until here, everything was fine except the fact that the example uses the a cRIO-9104 with NI-9870.
Because I'm using the cRIO-9074 with NI-9871, I made a New / Target and Devices and added my cRIO-9074 to the project using LabVIEW FPGA Interface.
To place all the VIs in my device, I've dragged these files/folders from the other device to mine:
- NI Modbus - cRIO
- Low-level Serial VIs
- 4-port serial.vi
- READ_FIFO
- WRITE_FIFO
- cRIO Modbus Example (Host).vi
The files were placed in the same place under my new device, and the old device from the example deleted.
After that, when opennig the main VI: cRIO Modbus Example (Host).vi I started to correct the problems, adapting the example to my hardware, since the run button is broken.
I started to drag the 4-port serial.vi to the FPGA Target in Block Diagram. Under this VI, I need to change the FPGA I/O Method Node, from NI 9870 -1\Port1, 2, 3 and 4 to mine and here I had the first problem. When making right click and Add New FPGA I/O, the window just has two empty columns, no I/O can be selected at this point and I don't know why.
Since I can't add my devices I/Os to this VI, I get some broken link on the main VI.
I send you my entire project for some help. If you know I could I solve this problem, please let me know.
And once again, thank you for the support.
Quintino
02-07-2011 06:58 AM - edited 02-07-2011 07:00 AM
You have a NI 9871 module, so you have to assign ports to 9871 and not to 9870.
I modified it in the archive.
Regards,
Romain P.
National Instruments France
02-09-2011 01:39 PM
Thank you Romain for the reply.
I've tried the project you just send me, but with no success.
I get all the errors of the list in attachment. When I try to solve this problem, first opening the 901x 9870 DMA Write (Sub).vi there's a problem under the WRITE_FIFO.Write that I don't know how to solve:
An internal software error has occurred. Contact National Instruments technical support at ni.com/support. Error details:Error -61499 occurred at nirviMethodCheckBeforeScript.vi<-nirviMethod.xnode:nirviMethod_GenerateCode.vi:1<-nirviMethod.xnode:nirviMethod_GenerateCode.vi.ProxyCaller
Possible reason(s):
LabVIEW FPGA: An internal software error in the LabVIEW FPGA Module has occurred. Please contact National Instruments technical support at ni.com/support.
Additional Information: The target class configuration does not match the target class in the bitfile. This could be caused by using the same VI in different targets. Try renaming your target.
If you please have any idea or solution, please advise me.
Once again, thank you.
Best regards.
André Quintino.