LabVIEW VI to read a meter of Modbus

Hi all

I'm trying to use LV with Modbus bookstores to read/write information to a Flowmeter Micromotion. The meter is connected to the PC via a B & B electronics isolated converter USB RS485. VISA see the converter very well. However, every time I try the meter reading, I get an error "VISA: (Hex 0xBFFF003E) could not complete operation because of the i/o error."despite all my efforts. " Can't understand you my problem, maybe it has to do with how I address the meter? I posted my code for any future reference.

Thank you, it turns out that my camera had been incorrectly wired. I can now read the information I need from the flow meter.

Tags: NI Hardware

Similar Questions

  • Read power meter in LabVIEW via RS-232/RS-485

    Hello!

    I have a power meter, an advanced WM14 DIN power Analyzer. I want to display different values, Kwh, WILL, etc. Kvar, the meter in the graphs in labview. I have just a basic knowledge of Modbus RTU and with RS-232 connection. But I don't know how to make it work with labview. To my counter, I plugged a converter Moxa TCC-100 (see attachments) RS - 485 to RS-232, given that my electricity meter works only with RS-485.

    The converter, I have an adapter usb to RS - 232 (see attachment) to COM3 on my PC.

    Perhaps the easiest way would have been the connection directly http://sine.ni.com/nips/cds/view/p/lang/sv/nid/12845 . But I have not bought!

    So now you know the configuration of the connection, drivers for the usb adapter is installed and also VISA drivers. I found no good examples explaining how you can do with programs and data sending and reciving.

    I have google around and discovered that you use read/write VISA blocks, and that there is a library, Modbus, you could use. I installed the library, but I don't know how to connect with my electricity meter.

    I have a communication protocol to my electricity meter, but I don't know how to use it.

    I'm a little stuck and don't really know where to start. But my understanding of modbus, such things should be easy to do, so I think that's not too difficult to learn.

    Is there anyone who could explain how these work thing or if there is something I could read or see?

    Best regards Maurlind


  • Analog value read with DSC Module Modbus

    Hi, I have a Delta PLC with an AD converter module. I use the four analog channels and in one of them, I have a thermocouple which displays temperature data on a microprocessor thermocouple meter. However, I want to display the data in Labview. The controller communicates with labview through the DSC Module of labview with success, but I am not able to read the data. Looking forward to your help.

    Found the solution. addressing to the modbus master was different for this model of plc, so I looked up the address for delta plc Modbus and the analog read list has been a success on labview.

  • LabVIEW allows to read an Excel file to a control and add a checkbox for each line

    As say the topic, I need to use labview to read an excel file and show it in a control, such as mclb; I should add a checkbox for each line then allow me to choose the line I want. What should I do? Thank you very much.

    guiming wrote:

    I can read an Excel file to a spreadsheet, but I have no idea how to do to add a checkbox for each line.

    Sometimes, all you need to do is Google. https://decibel.NI.com/content/docs/doc-25000

    http://www.labviewing.com/check-box-in-multicolumn-ListBox/

  • LabVIEW csv file reading does not correctly.

    I try to use the spreadsheet read vi file as follows the attached csv.

    He did some things wrong:

    (1) the first cell in the resulting table has ÿþ attached to the front of it, it looks like labview is striking some special characters, it should not? (Notepad, notepad ++ and excel can open all the file with no problem and no show ÿþ or something like that).

    (2) it is abuse characters from end of LIFE as two line breaks, resulting in empty rows between each row of data. (Looking at the csv file in notepad ++ confirms that the lines are completed with a CR and LF (same as EOL).)

    (3) I read in sub form of string, because one of the columns is nonnumeric, but then I remove this column of and try to convert the remaining string table in a digital picture (failure). It also fails if I shoot an individual element of the array and try to convert it to a number (in either case, using the string fract/exp number), below, I have an example of attempted to read from the 2nd column of the 1st row (index: 0.1) which is being shaped as a string: "1.37238168716431" and conversion which gives 0 as you can see in the snapshot of the façade into a number.


  • M127fn MFP: How to read the meter of pages on m127fn mfp

    How to read the total number of pages printed on this m127fn MFP?  In status screen supplies, it shows only "pages printed with this offer.

    Due to another problem, a technician from HP told me through a hard reset, after which I had to get all of my preferences. So this mave have reset the NVRAM that is associated with the page counter as you suggest. I installed the latest firmware today but the page counter is at 104 and supplies report 634 and "basket is very low" message that is expected since it is a life of aprox 700 starter cart.

    Thank you for your insight and suggestions. I'll keep an eye on the config. page counter when I start a new shopping cart.

  • T500 Vista Enterprise - can not read power meter on taskbar

    Just past to my new T500.  It is running Vista.  For some reason any gauge in the task bar appears, but the percentage or the time inside the battery icon in the taskbar is almost impossible to read.   The only way I can get the info is to place the mouse on the icon.    Someone at - it works in it, or have any suggestions?

    See you soon

    Mike

    Found the answer... is transparency.   I had disabled... enabled and I'm good to go.

    See you soon

    Mike

  • Point of Modbus DSC read does not correctly

    I use 2013 LV 32-bit on W7 64-bit.  I talk to an industrial controller with Modbus to Ethernet.  My current software uses the interface modbus DSC, in which I define the bus Modbus itself within a library in the project, and then set each point Modbus as an address within this definition of modbus.  Inside LabVIEW, you can then get the data Modbus via shared Variables.  I am currently using the dynamic variable calls shared, rather than static variables shared.  I have points that are Boolean (coils) and real, with a read-only and a read/write.  In general, it all works.

    However, there is a real read/write that acts funny.  If I put a new value, or the industrial controller assigns a new value, the industrial controller Gets the new value.  Variable motor shared on my computer gets even the new value, as can be verified by opening the Distributed System Manager.  But LabVIEW continues to read the old value, without error.  Other points of read/write work very well, and I have looked on the definition of the address several times and cannot find any reason why this should be different than the others.

    Does anyone have any ideas why DSM sees a new value of a shared variable, without LabVIEW continues to get the old value?  I watched the init for the dynamics of SV case, and I see all the options I can change to try to solve this problem.  My next attempt will be to rewrite the entire auxiliary system so that it uses the most recent Modbus Library of NOR and ignores the whole thing of DSC.  It will be probably much better for other reasons as well.  I noticed that with DSC and the shared Variables, the first time that the program runs it starts fairly quickly, but subsequent executions can take up to two minutes to connect to the SV.

    Thank you

    DaveT

    Never mind.  I think I found the problem.  A bug minor configuration in my own code...

  • Read Modbus register at a variable point number

    I am just reading for a Hart Modbus controller prolinx I talked to Prolinx, and established that my pressure values are coming from 40031-40032, my values flow from 40131-40132 each standard U16 values using LabVIEW code are:

    I get a rather absurd number.  I tried to reverse the tables and byte and Word-swapping.  all to nothing does not.  for register 31-32 bed 61919 LabVIEW and 16811 respectively must be combined to get something close to 82 + some change and records 131-132 i read 17054 and 61858 respectively which must combine to 79 and change.

    I tried most of what I can find on there, but ask your question about the holes in this issue he can pop something.

    Thank you

    Mark

    Hi Marc,

    you are doing something wrong:

  • How to connect Labview to PLC Modicon Quantum (140 CPU 311 10) with Modbus

    I was wondering if someone could give some tips on how to connect Labview to Modicon Quantum plc (the card is 140 CPU 10 311).  I am eager to serve a Labview HMI to control the controller that is used to implement the control PID with a VFD.  Currently I can communicate via Modbus to the API for programming using UnityPro XL, but I have no idea how to connect Labview.  I read the article on place OR "connect Labview to any PLC via Modbus", but I don't know yet.  Any help will be greatly appreciated.

    Hey Greener.

    Communicate with the PLC via Modbus usually requires the Datalogging and Supervisory Control (DSC) Module to have this feature available in LabVIEW. The white paper which indicated you using this module, which may explain why you can't get the communication at work. If this is something you don't have, and purchasing a license is not an option, then you might be able to use Modbus unofficial libraries to get the functionality you need. I have included a link below to a Modbus for LabVIEW library that you can try.

    DSC module:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/209851

    Modbus Library:

    http://www.NI.com/example/29756/en/

    Kind regards

    Ryan

  • PCI-6601 reading pulse without stop the meter

    Hi, the problem seems to be simple, just for the moment that I did not came up with a reasonable solution. I'm programming the meter 6601 for the following using my own routines of driver (in visual studio 2008 C++) for read/write registers. I follow carefully the DDK examples. I started with the example 1 and 4, and it works very well and now I have to somehow come up with the following code:

    1. I use the signal specific to 10 MHZ external H. MAser as input to the meter.

    2. I start the meter with arm software and am constantly read the values of the counter.

    3. I want everything just to read a single pulse (1PPS) and make the absolute time of the counter in time synchronization UTC. He should simply give me the meter reading of the rising edge of the PPS signal but after that it should be possible to read the counter as usual by reading the save save values, so read pps without stopping, nor anything in the registers of meter loading or b, simply give a pulse reading and continue even as 2...

    Any suggestions?

    Hello

    problem solved, but anyway, to all those who might have a similar task, here are the raw extract of what I've done (code names and function are similar to the DDK, but has nothing to do with the DDK)

    Sub yourclass::yourppscountfunction()
    {

    m_stopPPS = false;
     
    first reset internal values
    card1. Write_G01_Joint_Reset_Register_G0Reset(); reset the counter 0
    card1. G0_Reset_Registers_Values (); Reset internal values
    Disarm
    card1. Write_G0_Command_Register_Disarm (true);
    load the initial value of 0
    card1. Write_G0_Load_A_Register (0x00000000); counter should start with 0
    card1. Write_G0_Command_Register_G0_Load (); tells to load the initial counter of a register value
    Set the source to time external base
    card1. Write_G0_Input_SelectRegister_SourceSellect (1);
    Select the axis dedicated to door sellect (default value in this case, PFI_38)
    card1. Write_G0_Input_SelectRegister_GateSellect (1);
    card1. Write_G0_Mode_Register_Gating_Mode (2); rising edge Gate
    card1. WriteIO_Config_Reg_Pin36_Select_out(); Configure the PFI_36 PIN to drive the output
    card1. Write_G0_Mode_Register_Output_Mode (1); We're out the TC, connect to a counter2 to count the animated buttons
    Configure the PFI_36 PIN to drive the output (not made here)
    card1. Write_G0_Mode_Register_Trigger_Mode_For_Edge_Gate (3); Gate not used to start or stop
    card1. Write_G1_Command_Register_Synchronized_Gate (true);
    card1. Write_G0_Command_Register_Up_Down (1); counting direction up
     
    card1. Write_G0_DMA_Config_Register_DMA_Enable (true);
    card1. Write_G0_DMA_Config_Register_DMA_Int_Enable (true);
     
    arm the meter
    card1. Write_G0_Command_Register_Disarm (false);
    card1. Write_G0_Command_Register_Arm (true);
    WRITE THE COUNTER VALUES
      
    card1. G0_Write_Mode_Registers();
    card1. G0_Write_G0_Input_Sellect_Registers();
    card1. G0_Write_G0_DMA_Config_Registers();
    card1. G0_Write_Command_Registers();
    while(!m_stopPPS)
    {
    PeekAndPump();
    now loop to see if measures available PPS, if yes, read them and display
    If (card1. Read_DMA_Status_Register_G0_DRQ_Status()) //if that something saved
    {
    unsigned long int counterValue1.
      
    int HWSaveorSWSave;
    HWSaveorSWSave = card1. Read_DMA_Status_Register_G0_DMA_Readbank();
    if(HWSaveorSWSave==1)
    {
    counterValue1 = card1. Read_Save_Register();
    m_editPPSreading = counterValue1 * 1.E-7;
    }
    on the other
    {
    counterValue1 = card1. Read_HW_Save_Register();
    m_editPPSreading = counterValue1 * 1.E-7;
    }

    This-> UpdateData (FALSE);
    } //if something red

    } //while
    card1. Write_G0_Mode_Register_Gating_Mode (0); gating disabled
    card1. Write_G0_DMA_Config_Register_DMA_Enable (false); Disable dma
    card1. Write_G0_DMA_Config_Register_DMA_Int_Enable (false); Disable interrupts
    card1. G0_Write_G0_DMA_Config_Registers();
    card1. G0_Write_Mode_Registers();

    } //after you might normally read the meter (PPS values are added to playback as UTC offset-> not done here)

    to stop playback PPS and continue as normal counter where the values are simply red of the SW save registers
    Sub yourclass::yourstopppscount()
    {
    m_stopPPS = true;
    }

  • Reading port com1 through LabView

    Hi all!

    I create an application that will receive the data sent by the software installed on your computer. The software communicates with the hardware dedicated via usb connector. In the software, it is possible to choose the COM_x (x = 1, 2, 3...) port and baud rate.
    The purpose of this application is to follow the data sent to the material in order to control it as the data sent.

    The questions are:

    How to display the computer COM port in the LabView environment?

    And you need to install the driver-s for this? What is?

    The COM port is available on your computer should appear in the NOT-max software?

    Unfortunately, I couldn't find this information and I need help for this application.

    Thank you

    Gabriel

    So another piece of software on the same computer has a serial port control and sends data through it.  You want to intercept these data?  Unfortunately, LabVIEW can do that.  LabVIEW will take control of a serial port and have full control of it.  It will not share a port with another software.

    Now if you made a loopback cable and used a second port, your LabVIEW program can read the data from this port.

  • How to read data from the unit to acquire data with LabVIEW

    Hello everyone, I'm new with LabVIEW and I need help. How to build LabVIEW program to read and store the data acquisition unit temperature data. the data can be any store such as Excel or a text file? Thank you.

    Start passing by examples of LabVIEW.  Go to help-> find examples.  There are several examples here just for the analog input and then even more for logging data to a file.  After that, show us what you have and we can guide you a little better that way.

  • trouble with rs 485 on Labview.

    Hi guys, so I try to read data from a meter (kron Mult-K), the rs 485. I haven't used the software of kron and his works. But now I want to read the same data on LabView and I can't read anything. Sorry, I'm new on this. If anyone can help.

    Best regards!

    Hello

    Try to use the samples available in the Modbus Library and read a tutorial on Modbus LabVIEW.

    ModBus protocol reference guide

    http://www.NI.com/white-paper/52204/en/

    Modbus Library

    http://www.NI.com/example/29756/en/

    I hope it can help you.

  • With the help of a NO-9401 read the angular Position and trigger a reading I

    Hi all

    I am writing some software dependent vs angle chart and to the monitor when the buttons are pressed.  The software allows all DAQ lines to be configured so that multiple configurations data acquisition can be used.

    Currently, I peut use my NOR-9411 read the angular position of my quadurature encoder and trigger the playback of my entry (measured with a NEITHER-9219 or 9237) load on a rising edge of A or B input terminal analog.  Also, I can configure the software to do the same thing with a card OR-6259.

    My problem is that when I switch to a NO-9401 to read my meter task, I can no longer use the input terminals A or B to trigger my analog input.  I get error-200414 saying that the entry A (PFI0) is an invalid clock source.

    I know that the 9401 is configurable by nibble for input/output lines0:3 and 4:7, but how that affects the ability of a trigger, a route line PFI?

    Measurement and Automation Explorer shows it as an acceptable way of PFI0 AI/StartTrigger and AI/SampleClock.

    I joined the my code section that defines the tasks and that causes the error.  You take a look in the Utilities folder and open the Tasks.vi create.

    I am writing in LabVIEW 2011.

    Thanks for any advice,

    Rob Afton

    Test lab engineering intern

    Found my answer here if anyone has the problem:

    Link

Maybe you are looking for