I use the MODBUS library and can receive data, but I can send it very well?

Hello

I use the Modbus Library to communicate with a VFD to control a fan. I use the master write and read vi. I can write data to the drive mechanism and get the fan to do what I want. The VFD is supposed to send a package of confirmation after I told him to do something and I can also read its records. When debugging the VI it shows that the problem is that the buffer always reads zero and the VI timesout. If I look at the USB adapter lights to RS 485, I use to interface with the drive mechanism, I see that the flashes of light RX immediately after I send a message. So I should have something in the buffer. Does anyone have any suggestions?

Aaron

OK, here's what has happened to those who have this problem. In the series Receive.vi MB The bytes to the Port of property node has been reading 0 even if there was something in the buffer. Executing the program was then stuck in a loop until it expired and never went to read anything of serial port buffer. I didn't spend too much time wondering why that VI has not worked and created my own. Within a period appropriate after writing to the serial port, I used the same bytes to the Port property node and was able to get the exact number of bytes to the stream and then VISA vi the number of bytes to read. I received the message of the right answer and everything seemed good. But of course that NO! Then I experimented with different speeds of writing to the drive mechanism to get the fan to operate at different speeds. I found a small range of speeds where I get no response to the VFD, either in operation or by sending me a response packet. After a while, I found that there is a mistake in the LRC-8 code in the MODBUS library OR. It does not prescribe that the LRC will be a two-character value. So if your LRC is proving to be a single character such as F value (which should be 0F) you get an incomplete MODBUS message. This has been easily corrected in the vi LRC8 saying "number in hexadecimal string" vi to produce output with a minimum width of two. Then everything worked fine. Moral of the story, it's the MODBUS library is awkward.

Tags: NI Software

Similar Questions

Maybe you are looking for

  • KB982670 has no update

    Hello My apologies if this has been discussed before but I can't install an 'important' update for Vista, KB98260 by using Windows Update. Can someone tell me the direct source of the download from the MS site please so that I can try it from there?

  • A DSL modem can be infected by malware?

    I was just wondering if a DSL modem can be infected by the malware if it has previously been connected to an infected computer. Thanks for all the inputs.

  • Cannot open a SystemDialog before you start the event more in 10.3.1 loop

    In my app, I'm a housekeeper in the main application class constructor. The first thing I do is to warn the user about the use of data and give them the opportunity to accept and to accept and never ask again or give up commissioning. If they choose

  • Need to change the ACE 4710 certificate that uses the https access management

    I would change the certificate in Cisco ACE 4710 that uses for managing https access to the device. We always get the notice of security from the GUI because it uses a self signed certificate for access to the administration. Please suggest there is

  • Cannot download the CC extensions Manager

    I tried to download the new CC on my MacBook Pro extensions Manager, but get the message "failed download.