Process Failure when communicating over MODBUS using LabVIEW 2011 and DSC

I'm currently trying to read from a PLC's holding registers using MODBUS/TCP. I've confirmed that the PLC is updating the values and responding to MODBUS communication correctly using a third party program called Modbus Poll. However, when I try to poll the PLC using LabVIEW's shared variable engine, I am unable to read any values from the same addresses that I'm viewing with Modbus Poll.
My setup simply consists of a PC connected directly to the PLC over Ethernet, with no router in between. I am using LabVIEW 2011 SP1 with the DSC module.
I opened the NI Distributed Systems Manager to view the status of all shared variables in the Modbus library that I created and I've noticed that the CommFail bit is permanently set to "true". All other variables with a "read" access mode report "Process Failure". I've tried restarting the process as well as stopping and starting the local variable engine with no success. I've also restarted my computer several times to see if any services were failing, but this does not seem to have fixed the problem.
I finally resorted to monitoring communications over the network card that I have the PLC plugged into via Ethernet using Wireshark and I've found that while Modbus Poll is communicating with the PLC, many MODBUS and TCP packets are sent and received. However, when solely using LabVIEW or the NI DSM to communicate with the PLC, there does not appear to be any communication over the network card.
Something that may be worth noting is that I was able to communicate with the PLC and read values from it with the DSM on just one occasion, when I first figured out which addresses I should be reading from. It all stopped working shortly thereafter. Prior to this, "CommFail" was not usually set to "true" with my current configuration. Thinking that it was my firewall, I have since turned my firewall off, but this seems to have had no effect on the problem either.
Any help on this matter would be appreciated.
Solved!
Go to Solution.

Just a thought but I think the  register addresses used by LabVIEW are one off of the actual register #.  I was using a CRIO as a modbus IO Server and had to shift the register addresses by 1 to get things to work correctly (can;t recall if it was +1 or -1).  This is documented somewhere on ni.com but can;t seem to find it now.  But here is another  link that may help:
http://zone.ni.com/reference/en-XX/help/371618E-01/lvmve/dsc_modbus_using/
Dan

Similar Messages

  • Problems with Serial Communication using Labview 6 and Solaris 8

    I am working on a Driver for a Temperature Controller. But I am stuck at the very basics. I am using Labview 6 and the platform is Solaris 8 on a SUN Ultra 60 Workstation. I can not get the Serial communication to work. When I am running raw (uncompiled) code it works (I can read from and write to ttya and ttyb) but once compiled I get error code 37 (device not found). I have tried the following steps to fix this with no luck.
    1) I made sure that the "serpdrv" file is in the same folder with the executable. I also make sure the serpdrv file is added as a support file when building the app.
    2) I changed from using traditional serial VI's to labview 6's new visa functions. With these "new" VI's when
    I try to initiliaze the visa device and wire a control to the "visa reference" input only 1 serial port shows up (ASRL2, missing ASRL1). I am not sure if this is part of same problem or whole new issue.
    3) I reinstalled both visa and labview 6.0.2 update hoping this would help with no luck
    4) I placed the following entry into the ".labviewrc" file
    labview.serialdevices: "/dev/ttya:/dev/ttyb"
    If anybody has had the same problem I would love to hear about it and if you have any solutions
    Jamie Shea

    Hi Jamie,
    1. Do you have NI-VISA driver installed on the machine on which you are running this executable?? If you are trying to run the executable on the same machine on which the development program has ran fine, then you can ignore this point.
    2. If you have done all the changes that are suggested by other discussions related to this topic, then try changing the Port input to Visa Serial Configure.Vi from a control to a constant and try it. In some case, I have seen this to do the trick. I think this point should solve your problem. If it does do tell me. :-))

  • Is it possible to create a schedule in Labview . Example: i want to off the lights at 7pm and want it on at 8am. If there is can anyone teach, its for a school project. Im using labview 2011

    Is it possible to create a schedule in Labview . Example: i want to off the lights at 7pm and want it on at 8am. If there is can anyone teach, its for a school project. Im using labview 2011...thx

    Since this is a school project I recommend you do the work yourself. You will not learn asking others to do it for you. In addition, folks here will not do your homework for you. We are however more than wiling to answer specific questions for you. Post what you have done or tried and ask specific questions. I am confident you will get assistance.
    And to answer your question, yes LabVIEW can be used to implement a scheduling program.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Application crashes when calling DLL built with LabVIEW 2011

    Hello everybody,
    Our application calls DLLs built with LabVIEW 2010 SP1. We installed LabVIEW 2011 and built some DLLs. So far so good. If we start our application and run 2010 DLLs it still works fine. If we run a 2011 DLL just once no error happens, but if we try to run the same 2011 DLL our application crashes reporting the error below. I saved the code for 2010 version and built a DLL and it works fine. Does anyone know why?
    Thank you in advance.
    #Date: Fr, 16. Sep 2011 16:25:25
    #OSName: Microsoft Windows XP Service Pack 3
    #OSVers: 5.1
    #OSBuild: 2600
    #AppName: PasTA
    #Version: 11.0f2 32-bit
    #AppKind: AppLib
    #LabVIEW Base Address: 0x30000000
    16.09.2011 16:25:26.181
    Crash 0x0: Crash caught by NIER
    File Unknown(0) : Crash: Crash caught by NIER
    minidump id: 8a779b3f-51d7-4864-8e4d-6ab0195cd158
    ExceptionCode: 0xC0000005
    N
    0x3072C804 - lvrt <unknown> + 0
    0x3072CBB8 - lvrt <unknown> + 0
    0x7C864191 - KERNEL32 <unknown> + 0
    0x7C83AB50 - KERNEL32 <unknown> + 0
    0x00000000 - PasTA <unknown> + 0
    Attachments:
    error.PNG ‏11 KB

    On that note, you should be able to create DLLs in 2010 and run them with 2011, correct??  In my case, I have a 2010 built DLL (talking to sbRIO), most of the functions work when run in 2011, but a couple of them lock up LabVIEW on the desktop (but not the sbRIO), no lock ups happen with 2010 on the desktop.

  • TS2611 I re installed my Final Cut express software, now when I go to use my "halo" and "arrow" application I get a message that says the file format is too new for this version of the application.  Anybody have suggestions?

    I re installed my Final Cut express software, now when I go to use my "halo" and "arrow" application I get a message that says the file format is too new for this version of the application.  Anybody have suggestions?

    After install, did you go to  Apple menu > Software Update to update your FCE to the latest version?
    MtD

  • Program to write signals from PXI 5105 using labview 2011

    Hello
    I am new in using labview. I need help in writing program to continuously record the signals form PXI 5105 using LabVIEW 2011.  I prepared a program using help examples. It is recording the signal using pxi 5105 into the file after trigger. I tested the code using waveform generator with -100mV to 400mV, 1 kHz, sine wave. I have also attached the waveform of signal from the excel file recorded by the program. I have following queries
    (i) Is the program correct to continuously record the triggered signals. Have I used the while loop correctly?
    (ii) why some part in waveform is missing.
    (iii) What should be the value of millisecond multiple ( I used zero)
    I want to use above program for strain gauge signal measurement. Where I have to record the data at 20Ms/sec sample rate for 1 milli second after trigger.
    thanks
    Attachments:
    Signal recording programme.vi ‏85 KB
    recorded_signal.png ‏38 KB

    Hi,
    Sorry but I've only got LabVIEW 2010 so I can't open your file. If you can post a 2010 version I can take a look.
    vinod_p wrote:
    (iii) What should be the value of millisecond multiple ( I used zero)
    If you are talking about the "Wait until Next ms Multiple" function then "Wiring a value of 0 to the milliseconds multiple input forces the current thread to yield control of the CPU." (from the context help for the function - press <ctrl>+h). Is this the behaviour you want?
    Normally the ms multiple function is used to synchronise loops as it waits until the next multiple (be it 10ms or 10s) before continuing the loop.
    -CC
    "If anyone needs me, I'll be in the Angry Dome!"

  • Print text file with labview 2011 and windows 7

    I am having some strange problem, hope someone out there knows the solution.
    We have a labview program running under windows xp, the program runs some test and print label from a local label printer. Last week, I have to upgrade the computer to windows 7 and all the sudden the printer will not print any more.
    The print vi is very simple. I am using the report function and I am attaching the diagram of that vi below. 
    If I use windows notepad to open that small text file, I can print fine. This means the printer driver itself is OK. However, if I print the same text file through Labview printing vi, from the printer's task list, I can see it does not recognize the char. From the attached png file, the top one is the task from notepad, it shows 2 pages and the bottom one is from the labview, it becomes 33 pages. 
    For the printer part, I use Generic / Text Only printer driver which comes from windows itself. And I am aslo attaching a sample of the text file, there are quite a lot of special char, it is for print bar code. When I tried to use labview print text vi to print general text from my computer to a regular printer, the vi works. So it seems Labview print can not handle the special char? Although it worked many years under windows XP in the past.
    Welcome to any suggestions!
    Thanks
    Attachments:
    print vi.gif ‏9 KB
    labview print bug.png ‏26 KB
    SerialLabel.txt ‏1 KB

    DGU wrote:
    where to check RAW or TEXT? the print report vi only asks for file name and printer name.
    When I print from notepad, everything just goes by default. This is a label printer, so I never need to specify printing parameter such as size, orientation, etc in the past
    Famous last words go something like this: "...never had to do that before."  Maybe you have to do that now.  It's worth at least comparing the defaults settings for bothe generic drivers.  It could save you a lot of headache if you notice something different.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Outlook 14.3.8 not responding on MAC using Office 2011 and the pinwheel comes up OS X 10.8.5 ?? Ours seem to be doing it ever 5 minutes or so.

    Outlook 14.3.8 not responding on MAC using Office 2011 and the pinwheel comes up OS X 10.8.5 ?? Ours seem to be doing it ever 5 minutes or so.

    Outlook 14.3.8 not responding on MAC using Office 2011 and the pinwheel comes up OS X 10.8.5 ?? Ours seem to be doing it ever 5 minutes or so.

  • Controlling external equipment over GPIB using LabView

    Hi All,
    I am new to labview and I am trying to control two outputs of HP6624A power supply and one output of Tektronics 2021AWG using labview which I am not bale to do rightly. If some one can help it will be great.
    Actually I am trying all this to test an ADC and do some analysis on the results of the same. I have created the VI for analysis and it is working. Now I need to apply supply, clock & data to my device through these equipments. I was initally operating these equipments manually, but now I want to control them using LabView.
    I have down loaded the instrument drivers for both of these equipments.
    thanks
    janit
    I am attaching the vi through which I am trying to do so.
    Attachments:
    Inst_Control.vi ‏21 KB

    Basically all of the apps I've had to program have required GPIB communication. I have tried the drivers written by the manufacturers of all the devices, and found it easier to write my own. For instance, to read the value of an Agilent (HP) multimeter, I have the attached vi.
    It's easier to use the manual GPIB communication vi's, than it is to have to deal with the ones writting by HP for instance (*In my experience*...it may be different for other people). You have more control over when and what commands are sent.
    Attachments:
    Read Meter.vi ‏23 KB

  • Labview: resource not found error code 24 when building executable using 8.20 and dsc module

    I am trying to build an executable and I keep getting and error and cannot seem to figure out what is wring.  The whole error is "LabVIEW: resource not found.  An error occured loading "interface 3.vi"  Labview load error code 24:  this vi cannot be loaded because it is broken and has no block diagram."
    I am using LV 8.20 and DSC 8.2.  I am trying to create an executable that has the web server running for using remote panels, i have netowrk published shared variables, connecting to a fieldpoint unit, and I am using the NI system tray icon vis to load the program to the system tray.
    I have my shared variable library added as a support file, as well as the lvdsc.ini, and the tray icon files.  I have sleected "Enable Enhacned DSC run time support" in the app builder, did not remove any type def,etc.
    I cannot get the .exe to run on my development machine or another machine, I get the same error.  I tried creating an installer that installed the 8.2 runtime, dsc,fieldpoint, variable engine and manager and MAX.
    I could not find anything in the help files on the dsc, maybe someone else has some hints.  thanks
    Kenny

    Hi Kenny,
    I hope you are doing well today! What is interface 3.vi? Is it possible for you to post your project over here? Also, I would recommend creating a simple DSC application; and would like you to build it. Do you still get errors?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • I Require an Example for Message based communication in VXI using LabVIEW

    I'm trying to use Tektronix/CDS 73A-453 for sending data to a remote terminal through MIL-STD 1553b. Please give some examples in this, as I am unable to start the project without knowing these basics. Thank You.

    Hi,
    If you are using LabVIEW or LabWindows/CVI you can find a driver for this instrument at this website. Select Tektronix/CDS as the manufacturer and enter 73A-453 in the Additional Keywords and hit go. This will bring up the two drivers. When you install this on your computer put it in the following directory:
    C:\Program Files\National Instruments\LabVIEW 7.1\instr.lib
    If you place it here the functions will show up in LabVIEW if you go to the Block Diagram's Functions Palette>>Instrument I/O>>Instrument Drivers. This should get you started. If you have more questions please repost.
    JenK

  • "Not Enough Memory" Error when programming Keithley 2400 using LabView 6i

    I'm trying to use LabView 6i drivers to control a keithley 2400 via GPIB interface. Most of the drivers work fine but the high level operations such as a the sweep functions or even functions that perform a single measurement gives a "Not enough memory" driver error. What doesn't have enough memory? A single measurement can't overload the PC's or Keithley's memory buffer so why am I getting the error?
    Thanks for any help you can offer...
    Evan

    Evan,
    That's not a LabVIEW, GPIB, or NI-VISA error code - that error is generated by the instrument driver. I went ahead and downloaded this driver from keithley.com to take a look at this Perform DC VI.vi function's source. But unfortunately, the heart of the Perform DC VI function is a "Call Library Node" call to a keithley DLL, so that is a black box. Also, no c-source included that I could find, so I could not look at that either. And since I don't have a Keithley 2400 to play with, that brings me to the end of the rope on my system.
    A couple of more things you could try, however, since you actually have the instrument.
    (1) Definately build a simple VI to eliminate other aspects of your program. In this case, the most simple
    VI would be an Init, Perform DC VI.vi, and then a close. Make sure this simple program reproduces the error. If it doesn't, then the problem is likely introduced in your code, not the driver.
    (2) If #1 reproduces the problem, then check that you have all the driver pre-requisites correct (ie, that NI-VISA is installed, that the GPIB board is working properly, etc).
    (3) If #1 and #2 do not result in any discoveries, then you will have to enter the black box of that DLL. Primary method to do that, to be honest, is to contact Keithley and ask for help, since they developed the driver. Second method is to use our NI-SPY utility, which can capture all calls to VISA drivers, (since this is a VXIpnp driver, it should be fundamentally using VISA within the DLL). Within NI-SPY, you will be able to see the individual function calls, and which ones are returning errors. That may help point in the right direction.
    Regards,
    Greg Caesar
    National Instruments
    Applications Engineer

  • RTD Temperature Measurements using LabView 2013 and MyRio

    Hey everyone.  I am VERY new to LabView programming and working with a MyRio.  I need to figure out how to measure the resistance of a 2 wire RTD to find a temperature utalizing the MyRio and LabView.  I am pretty lost on how to do this.  Does anyone know some good resources for making the LabView program off of the tops of their heads?  I've figured out how to measure from specific pins, but I am not sure how to get it to constantly output a voltage from the output pins.
    Eventually, I would like to have it display the temperature as well as have it turn on or off a heater depending on that temperature, but that will come far later in this process. First things first, how do I take temperature measurements utalizing LabView 2013 and a MyRio with a 2 Wire RTD. 
    Thanks so much!

    Hi JoshEpstein87,
    The myRIO can't acquire a change in resistance directly, so you'll need to somehow convert the change in resistance to a change in voltage. There are multiple ways to do this, but you'll need to build an external circuit and then read the voltage output with the myRIO. One example of a circuit that allows you to do this can be found here. To output a voltage on the analog output pins, you should just need to set the output voltage and then it will remain at that voltage until you change it or power cycle the myRIO.
    To get started with LabVIEW and myRIO programming, see the following page:
    http://www.ni.com/myrio/setup/getting-started/
    There are some links to LabVIEW training as well as resources about RIO programming. I also highly recommend you check out the myRIO Community as there are example programs on there that you can take a look at to see how they are designed.
    Best Regards,
    Matthew B.
    Applications Engineer
    National Instruments

  • Using Labview speaker and microphone with multisim

    I've just installed the student version of Circuit Design Suite
    10.0.  When I try to use the supplied Labview speaker and microphone all of
    the controls are greyed out.  I'm able to use the Labview signal analyzer
    and the signal generator just fine.
    I'm using Windows XP Pro and have a 2.4 GHz Pentium 4 processor with 1.5 GB
    of RAM.
    Is there something I can do to allow me to use the speaker and
    microphone?
    Rich Green

    The speaker and microphone are not real-time components, you need to give it time to acquire the data, only when it finish the button will be active.  For this feature to work, you need an actual microphone to be connected to your machine and if you talk into it, it will capture you voice and can send it out through your computer speaker. 
    Tien P.
    National Instruments

  • Complete hardware simulation using LabView, Multisim, and MAX (easy answer accepted!)

    Hello, all!
    Sorry, I'm new, but I've checked around for a definitive answer on this, but I'm not 100% sure.  I'm learning LabView for an upper-division Physics class.  We're using NI hardware (DAQ-MX) and a mix of lab hardware - primarily basic stuff such as voltmeters, oscilloscopes, and breadboards with simple components.  I'm also doing some work with NIM instrumentation, but that's secondary to my needs here.  So, when I'm away from school, is it possible to do a complete simulation of my classwork using LabView, Multisim (for my breadboard), and the Measure and Automation Explorer (for the DAQ-MX)?  I know that I can create a circuit and drop it into Labview, but I'm not so sure about the DAQ.  I'm hoping for something that's a "seamless" recreation of what I'm doing in class.  I can take a simple "yes" or "no"; as long as I know that it's possible, I can look for the solution.
    Thanks for the help!
    Solved!
    Go to Solution.

    I have an easy answer and a harder answer:
    Easy Answer
    You can simulate almost any NI instrument in MAX.  Right click the Devices and Interfaces item in the left pane and select Create New...  Unfortunately, this limits you to whatever the driver designer thought would be a good signal.  It is good for simple testing, but you will rapidly run into its limitations.
    Harder Answer
    Use LabVIEW classes to make a hardware abstraction layer.  This my seem like an advanced topic for a beginning LabVIEW programmer, and it is, but it also neatly solves the problem of switching between simulation VIs and real acquisition VIs without writing a bunch of switching code.  In short, you create a LabVIEW class which has the interface you want for you data acquisition.  This can be your simulation code.  You then create a child class which has exactly the same interface, but uses the DAQmx/NI-SCOPE/NI-DMM/etc. that you really want to use.  Switching between the two is as simple as selection the class you want to use at run time.  This is a lot of info in a short time.  If you want to go this route, read the LabVIEW help on LabVIEW classes and work through the examples.  I would encourage you to do this, since the sooner you learn how to effectively use object-oriented LabVIEW, the easier your life will be.
    As a further bit of information, most of the measurement instrument groups (e.g. NI-SCOPE, NI-FGEN, NI-DMM, etc.) allow you to simulate an instrument if you use the open with options VI instead of the standard open VI.  The inputs are rather arcane, but get the job done.
    Let us know if you have further questions.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • Client_text_io does not write the file but does create it.

    Hello there! I have a form which generates a .txt file using client_text_io webutil function. this is the procedure: PROCEDURE CREA_FILE IS MYFILE CLIENT_TEXT_IO.FILE_TYPE; OUTFILE CLIENT_TEXT_IO.FILE_TYPE; MFILE VARCHAR2(1000); MLINE VARCHAR2(5000);

  • New IPod Touch 4th Gen isn't being recognized by my computer or itunes.

    I got a new IPod Touch yesterday and I am finally getting the time to sit down and set everything up and when I plugged it in it makes the charging sound but itunes is not finding it and neither is my computer. I've been messing with it for hours now

  • How to delete a particula record from InfoObject

    Dear All, I got some problem situations and would like some suggestions from any of you. <b>Problem detail</b>- one process chain was failed due to could not activate an ODS-A - ODS-A and ODS-B contained InfoObject-0BP_GUID - errors were found and re

  • About cji3 layout

    dear all:             In  report CJI3, there is no option of the  "profit center"  in the column set, how to add it?             Thank you!

  • Display iFrame in Overlay

    Hi all, Im developping a webpage in which I need to display some iFrame content in the Overlay written with Javascript. The code works perectly in IE6/7 and Firefox, but in Safari, it works only the first time the overlay comes up. if I click on "bac