Timeout when using Modbus vi

Hello

I develop a .vi that queries data from two separate flow meters and a N - A via Modbus converter.  The interface on the flowmeters are set to 111 address and cannot be changed, so I can't use the same master to get the data of the two flowmeters.

Ive attached a picture of the code for reference. Ive included only the part of Modbus to not confuse the issue.

The problem is, when I change the schedule of the loop to 5 seconds, I take the readings of modbus timeout error 61 and loops from re - connect try but can't re - connect to them. When the time is 3 seconds or faster, they work perfectly.  4 seconds, I get an intermittent error, and the case of re - connect works fine.

3 seconds or less = works very well

4 seconds = occasional errors

5 seconds = no job.

I'm not an expert in Modbus with certainty.  So please excuse my messy code.  I intend to clean it once I get it working correctly.

My flowmeters are RS - 485, 38 400 baud, Modbus RTU.  They connect to modules of ADAM 4017 I use the Modbus TCP to connect to.  The A/D converter is also of Modbus RTU and its on the same circuit as the MMin counter and its address is 3.

Any help or advice would be appreciated. I can reach the entire .vi if necessary.

First of all, I wanted to note that it looks like you are using a different API the API OR-supported Modbus, to take my answers with a grain of salt.

A complete shot in the water, it is possible that the device that you communicate through a form of communication for a period otherwise it goes into a resting State after the connection. For example, if you do a Modbus TCP connection and then no communication occurs for more than 4 seconds, the slave goes into an idle state. This doesn't seem like a problem. likely, but it's something to look at. Due to the fact that I'm not familiar with the API you are using, I don't think that there is much more that I can recommend.

Tags: NI Software

Similar Questions

  • DAQmx (200284) timeout when used in threaded loop - parallel processes

    Hello

    I use a fast NI6537 for a digital Acquisition. The Board of Directors is installed on a NIPXIe-1062 Fund controlled by a controller OR SMU-8130, where the software is running. I read all the 32 lines as a single channel, 50 MS/s, and the clock is one provided by the Council itself. I set the timeout as infinite, but I also tried various other parameters. As I read a finite samples lot of 524288 samples at 50 MS/s, a timeout of 1 second should be enough by far.

    As much as I put the call DAQmxReadDigitalU32 (...) in a simple loop I have no problems, everything works fine.

    for (...) {

    DAQmxReadDigitalU32 (...);

    } / / This loop works perfectly

    While, if one has a loop within a multithreaded process, or simply I give the system of freedom inside the loop, sometimes, I get the timeout error. Note that the time cost of the Sleep() function is only a few milliseconds, so there is no reason for the call to timeout.

    for (...) {

    DAQmxReadDigitalU32 (...);

    Sleep (1); To free the system resources...

    } / / This loop stops erratically

    With the latest code, I see also that in fact, the jury has not finished playing, i.e. less back than that requested samples. It seems to me that something is preventing the acquisition, but I'm not able to understand that. The same phenomenon occurs even in LabView, using the VI read: sometimes reading randomly generates a timeout error and stops, although LabView is the only application running.

    You could tell me what I'm doing wrong?

    Thanks, Piero.

    Hello Piero,.

    I don't know how you built your code in labVIEW, but I was unable to reproduce this.  The error that you have posted but reflects an overflow memory buffer and we has expired.  How many samples you ask to be returned with your DAQmxReadDigitalU32? In the code that I've built, I simply left the default timeout to 10 seconds and asked that all the samples available in the buffer.  I have read the pieces of the buffer until I hit 524288 samples desired and then I get out my loop.

    This error probably indicates that you ask a number of samples and have not yet acquired in the timeout you set.  Please post if these suggestions do not help.

  • Error timeout when using hardware DAQ-6024E frequency measurement



  • Deal with failure when using LabVIEW 2011 and DSC MODBUS communication

    I'm currently reading from operating records a PLC with MODBUS/TCP. I confirmed that the PLC will update the values and in response to a MODBUS communication correctly by using a third-party program called Modbus Poll. However, when I try to query the PLC using the LabVIEW shared variable engine, I am unable to read the values of the same addresses that I consult with Modbus Poll.

    My installation is simply to a PC directly connected to the controller via Ethernet without a router between the two. I'm using LabVIEW 2011 SP1 with the DSC module.

    I opened the Manager of distributed systems OR to display the State of all variables in the Modbus Library that I created, and I noticed that the ILO CommFail permanently the value 'true '. All other variables with a 'read' access mode signal "failure of process". I tried to restart the process and stop and start the local variable engine without success. I also restarted my computer several times to see if any services did not exist, but this does not appear to have solved the problem.

    Finally, I resorted to listening to communications on the network card I have the PLC connected via Ethernet using Wireshark and found that while Modbus Poll communicates with PLC, number of MODBUS and TCP packet is sent and received. However, when using only LabVIEW or the DSM OR communicate with the controller, there don't seem to be any communication on the network card.

    Something that may be interesting to note is that I could communicate with the PLC and to read values with the DSM just once, when I understood everything first what address I should be reading of. All of this has stopped working shortly after. Prior to this, 'CommFail' was not generally set to 'true' with my current setup. Thinking it was my firewall, I have since disabled my firewall, but this seems to have had no effect on the problem either.

    Any help on this would be appreciated.

    So, I thought about it. It turns out that the IP address of the server i/o MODBUS must be set to the address of the MODBUS slave, not the local computer. The address of the i/o MODBUS server is defined by the navigation in the Explorer window projects, expanding the variable engine shared library for MODBUS and right click on the server MODBUS (for example Modbus1) item and select Properties.

    In addition, the addresses seem to be shifted by + 1.

    Thanks for the tip so.

  • Including a carriage return when you write in a single register using Modbus

    I use a NI USB to RS - 232 to connect with a Watlow EZ-Zone PM controller using Modbus Protocol and will have bad to write a value (set temperature) to the controller.  I got when reading registry values, so I know that my settings are correct.  I also checked this using a program of Test of Modbus Watlow provides.  Using this program, it became clear to me that a carriage return is necessary after the numeric value.  MB series query writing Master only allows a value of U16.  How can I include a carriage return?

    A statement like that makes me think that she's not speaking modbus.

    Run their program during execution of something like Portmon.

    Then compare the data sent back with the modbus specification.

  • screen saver turns on when using FaceTime

    Since the update to MAC OS Sierra, I noticed that my screensaver activates when using FaceTime - most annoying because I have to quickly move the mouse to put it all again.

    He didn't get it until I've updated from El capitan, so I guess it's something to do with MacOS Sierra.

    He's not doing it with Youtube but I'm still trying with Skype.

    Screen saver works as it should do it with an ordinary application (for example, safari, etc.) Pages) if I don't move the mouse or keyboard for the specified time (five minutes).

    I do not have hot set of corners, the display is set on turn off (energy prefs is system) after 10 minutes. Screen saver is five minutes of inactivity.

    I have an iMac 27 "retina, first generation (a little less than two years) with i5 and 16 gig memory, standard graphics M290X.

    I missed easy adjustment here?

    I have it, feel also my parents as well.

  • Why can I never get a good picture on my imac when using Skype?

    Why can I never get a good picture on my imac when using Skype?

    I use the free Skype to talk to my friend in China every week. They always see me on their computer or phone clearly, but I can never get a good video of them, clues why? I see a good image of myself, but never of them. I can't adjust the settings of the built-in camera because they are fixed. Is this my router modem, which is 8 years old now. What is causing this problem. If you look on YouTube there are hundreds and thousands of good quality webcam videos then why am I having this eternal problem year after year? I've got El Capitan OSX

    If they can see you clearly, the problem is not on your side - at least not in your Mac. Could be the router or you internet connection. Otherwise: https://support.skype.com/en/skype/mac/

  • When using on the part of the family can they others besides Organizer individual payments?

    When using on the part of the family can others besides the Organizer make individual payments without using the card of the organizers?

    Family sharing makes it easy for up to 6 people in your family share each other iBooks, iTunes and App Store purchases without sharing accounts.

    "Pay for purchases with the same credit card families and approve kids' expenses directly from the device of a parent." And share photos, a family calendar and more to help keep everyone connected. »

    Implement the family sharing - Apple Support

  • Where do I put the AutoFill feature when using Firefox?

    You people do a great job of describing 'How to use Auto Fill'... but nowhere in this article does say WHERE - to implement the feature when using Firefox.

    How and where can I find the setting?

    Thank you.

    PS: maybe that should be in the article somewhere.

    What about filling the data in a form (input field) on a web page?

    See:

  • Distortions of the screen when using Firefox on Android

    Hi, a recurring problem - when using Firefox on my Android Web site, are often distorted. If I try to zoom before to increase the size of police or image during playback, the screen breaks and distorts, with different sections of text and images disappear (black sections of the screen appear) or overlapping, often in a different font sizes. The Web site displayed on the screen as "jumps around." The same thing happens if I try to select text for copy - it is impossible to select all or selection is distorted. I have not had this problem before and noticed only recently. Almost impossible to use the browser now! What is the result of an automatic update of the software? Help, please! Thank you.

    Please try to update to Firefox 38.

  • Strange glitch Visual on the taskbar when using Firefox

    Hello

    I feel a strange glitch Visual on the taskbar when using firefox.

    Please take a look at this short video because it shows the problem, it's almost impossible to show in pictures.

    https://DL.dropboxusercontent.com/u/12595174/VIDEO0016.3gp

    I use firefox on Windows 7 Pro 64 bit v36.0.1. Video card is an ASUS R9 280 X using the latest drivers from AMD 14.12 Catalyst Omega Software.

    Motherboard is an ASUS M5A88 with 16 GB of ram and a processor of 6300 FX.

    It is a new construction that I have implemented in the last 24 hours, and this behavior was not present on the system using the same version of windows, firefox and even map chart and drivers. But on another card mother and CPU. Previous Board of Directors has been
    M4A79XTD EVO with a Phenom II X 4 955BE.

    The glitching does not occur when it is on the desktop and firefox is closed. It will not occur when you use IE - 64 nor does it when I am using the steam software or any Explorer windows/opening files.

    All the motherboard drivers are installed correctly, the integrated graphics card is disabled in the BIOS. I disabled the settings of firefox for hardware acceleration, smooth scrolling and text... to see if it was the question. It wasn't.

    I'd appreciate any help to solve this... Really, I don't want to use a different browser but it's bad enough and quite distracting to really annoy me, and I don't see any alternative.

    Thank you very much.
    H

    Hi jscher2000

    I was about to post a reply, because a friend suggested that maybe that's a rendering of issue rather than a firefox one video card even if it's strange how it affected firefox only. I didn't have a chance to test it on Chrome as it is a new construction and I don't want to install the software, I do not use.

    I went to the Manager of catalyst and had a glance to the settings. I changed something, but no help... I then started to make a simple change and test until I found that the activation "gpu up-scaling" in the properties of digital flat screens has solved the problem.

    I am now free twinkle

    Thanks for your quick response however.

  • Outlook has started to get a connection not approved when using firefox

    Outlook started having no reliable connection error when using firefox. Not sure why it started, but all the few minutes that it times out and I have to re - open outlook from google. He does not receive this error on IE or firefox android. I use win 7. I talked with microsoft and they say it's a problem of firefox not outlook.

    I tried the things:
    -Updated firefox
    -Updated antivirus
    -antivirus scans
    -disable the anti-virus
    -from firefox in safe mode.
    -clear all the cache and history
    -Disable all add-ons
    -system restore
    -past by mistake "untrusted connection" on the help of mozilla (does not solve it. There is no option to allow the certificate)
    -search on the net for a similar problem (found nothing)

    So far, it has been like this for a week and its starting to piss me off as it happened out of the blue.

    I solved the problem for someone else who has the same problem.

    Options - troubleshooting information - reset firefox

  • When using YouTube, I get foreign on-screen words. This does not happen with Safari.

    When using YouTube, I get foreign on-screen words. This does not happen with Safari.

    Clear the cache and cookies only from Web sites that are causing problems.

    "Clear the Cache":

    • Firefox > Preferences > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox > Preferences > privacy > Cookies: "show the Cookies".

    You can write a check for corrupted fonts and duplicate and other police issues:

  • How to reduce the volume of alerts in FF when using webmail without lowering the system volume (Mac)?

    I use Mac OS 10.6.8.
    When I access my webmail via Firefox, I get a Twitter hard whenever I have send or receive a new email.
    I contacted my ISP (Optimum) and they said tell Firefox to my computer to make the sound. They say that they have no control over it.
    I tried to reduce the volume of alerts in my system prefs, but it has not affected the volume of FF.

    How reduce or disable volume in FF when using webmail without lowering system volume?

    Thank you!!! The 'sound' button off in their preferences. Fixed. (It was so freakin ' fort!)

    I, in turn, chatted with Service to customer of Optimum and tells them that they must tell their supervisor to better educate their own service to the customer, instead of passing the ball. We'll see.

    Let contributors Mozilla smart to not return the ball.

  • Lag when using track changes in the large document

    I do experience lag when using "track changes" in a large .pages document (about 180 pages). I get the wheel of the Rainbow for about 10 seconds after completing each change, which makes it very difficult to obtain concrete results. Other applications on my computer work simultaneously without a hiccup. I use the latest version of the pages on the latest Mac OS. Anyone with a similar problem? Tips to solve this problem?

    It's unfortunate that Apple has not adopted an icon "Achtung Minen!" for the v5 Pages. It is slower than the second coming on intermediate to large documents, and it only gets worse when you add images at higher resolution. Apple has not designed there is a professional-quality, or as a realistic replacement processor for MS Word.

    There is nothing you can do, but seriously, re - evaluate your software solution for processing.

    Here's an icon from the WAD of v5.6.2 request Pages. Prophetic isn't?

Maybe you are looking for

  • Duplicate the reference: how to unify?

    I have references in doubles, that that is the same image on the disc has more than one reference entry in Aperture. If I delete the reference to Aperture 2 1 and then proceed to empty the Recycle Bin to open the disk file ends up in the trash of OSX

  • Is it possible to attach multiple files to a contact in the address book?

    I stopped using WinPIM for our small business when I paid for the sync option and it has stopped working. Because the devs don't understand much English, I could never solve this problem. I discovered on Thunderbird and go to calendar/address book/em

  • Monitor shows lines and different reasons when starting

    HELP, ANYONE WHO HAS ALREADY SEEN IT? After the last time we saw a video online, the screen goes crazy with pink & blue & then becomes black and audio while still playing. We need to stop & restart the computer several times (as much as 30!) before i

  • Get the bluetooth headset to work

    I have a new, but I guess that the old model laptop HP with Windows 7.  I bought a pair of bluetooth headphones inexpensive to listen to music, install them and it worked fine.  Has no use for a month or two, and when I went to them to use, they were

  • Direction WAAS (547) lack of CM... can not add

    Hello One of our devices WAAS branch had the wrong host name, and I've edited our DNS/GANYMEDE and updated the hostname in the WAAS himself. I went to the plant manager and delete the old entry and is gone to the branch WAAS, cms enabled, disabled /