09-13-2012 06:40 PM
I am using the MB FPGA Serial Master Query.vi. When I specify the 'Quantity' value in the 'Modbus Command' to any value I always get an output 'Register' array size of 1. I should get an array size specified by 'Quantity' value. Can anyone explain this behavior? I am using LabVIEW 2011 RT with FPGA for cRIO. I am using NI's Modbus library.
09-19-2012 05:44 PM
Hello faustina,
Can you please provide more information regarding you application and what you are trying to do. Looking at the help documentation for the MB Serial Master Query.vi you can see the Quantity input parameter represents how many holding registers to read from the slave. The VI returns the holding register at Starting Address and each following holding register up to Quantity. For example, if Starting Address is 0 and Quantity is 4, the VI reads holding registers from the slave at address 0, 1, 2, and 3.
The Holding Registers output represents the data read from the slave (array of U16). What values are you setting for the Starting Address and the Quantity?
Paul-B
09-20-2012 04:46 PM
Apparently the problem was in the FPGA code. When I set the "Transceiver Mode" using MB FPGA Serial Init.vi, I did not also set this parameter for all the ports of my Serial connection. Once I fixed that I received the proper number of elements in the array.
04-05-2013 07:26 AM
Can someone explain why i am getting this error. Picture is attached and the error window is included. I am using same vi and getting this error.
04-08-2013 08:17 AM
Omishra,
This error is commonly caused by a hardware fault. Make sure that your serial port (or whatever bus your using), is working by using one of the VISA examples found in the NI Example Finder (Help » FInd Examples). You should perform a loopback test at least to verify that the hardware is working as expected.
Omishra, in order to get better attention for your questions, it would have been better to post your question in a new thread since this thread is old and your question is not related to the thread (other than using modbus).
What hardware are you using? What version of the drivers? Which LabVIEW version?
I would reccommend posting your question and the answers to these questions and what troubleshooting steps you have tried on a new thread.