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:

Tags: NI Software

Similar Questions

  • How to convert a variable point in fixpoint number 18 bits/4Int and represent in the true HEXAGONAL shape (NOT of FFAE * 2 ^-14 for example)

    As an example of what I would do: floating point number can be encoded as true hexagonal like this (fxp) 18/4:

    -1, 6554565429687500e + 00-> 1001 / 1010 / 0111 / 1100 / 1100 as 9A7CC (9 is the part of the signed integer - 1 MSB beacause negativ). Is there a good way to do this translation?

    Simply mount the FXP for a U32, right shift of 14 bits, and display...

  • Where am I missing my illegal variable name/number

    I am updating a program that I created some time ago and set different levels of access based on a flag in a column. Now when I run the new version, I get variable name/number errors ORA-01036 occasional illegal in one of the functions.

    The code in question (where the only change occurred in this section) is:

    string l6Str = "SELECT email, leo FROM jc_hc_users_dev WHERE oof='F' AND id IN (SELECT usr_id FROM jc_hc_usr_snd_dev WHERE loi_id=:loiid OR grp_id=:grpid)"; OracleCommand l6Cmd = new OracleCommand(l6Str, lCxn); l6Cmd.Parameters.Add("loiid", OracleType.Int32).Value = L2id; l6Cmd.Parameters.Add("grpid", OracleType.VarChar).Value = l2GrpId; // if the reader is populated with email addresses, add them into a List for sending. using (OracleDataReader l6Rdr = l6Cmd.ExecuteReader()) { if (l6Rdr.HasRows) { while (l6Rdr.Read()) { if (l6Rdr["leo"].ToString() == "F") { CivEmails.Add(l6Rdr["email"].ToString()); } else { BccEmails.Add(l6Rdr["email"].ToString()); } } } }

    The loiid parameter is a Number (10,0) table and the: grpid is Varchar2 (10).

    Or is the problem in the l6Rdr ["leo"]. ToString() and l6Rdr ['email']. ToString() part?

    Thanks in advance for any help!

    I don't think that the problem is in the code from the outside. I guess that's probably on the query.

    Please, make sure that all values that are joined correspond to the data type:

    Number 4 and number (6) do not cause the error.

    can you show me the errors with the ORA-01036? Have you tried to reproduce the query in sqlplus? Maybe you can get more information...

  • What is the point number (spare part) protects cable for ILÇE-7RM2?

    What is the point number (spare part) protects cable for ILÇE-7RM2?

    I'm looking for this part:

    http://Helpguide.Sony.NET/ILC/1520/v1/de/contents/image/b_cableprotector.PNG

    Thank you

    Michael

    I discovered, that it is the part number:

    Cable protector: X-2591-933-2

  • Determine if an integer is a floating-point number

    I want to create a program that when an integer is entered in the digital constant, a floating-point number with zeros to the right of the decimal point lights up the LED on the front panel. The LED remains off for any other floating-point number. I know I want to use a ride to the nearest function, but don't know where to go from there.

    rtufaro wrote:

    I want to create a program that, when an integer is entered in the digital constant,.

    You want to say CONTROL, right?

    You just need a type of rounding.  No matter if round you upwards or downwards.  If you just around and then compare the entry to the rounded value.  If they are equal, you turn on your LED.  So all you need is a digital control, 2 functions, and a boolean flag.

  • VISA read where you don't know the number of bytes?

    I work with a VISA resource via the USB port that reads in the results of printf (% lu % TSP %d)) of a microcontroller. These results are as ASCII numbers, their length in bytes is unknown. Numbers * should * be not more than 3 digits, but I can't know that for sure. Reading VISA won't let me the number of bytes unwired, so should I join just a high constant let him? Or is there a better way?

    1. do you have the microcontroller send a character to end of line (0xA on the ASCII table) at the end of the printf.

    2. turn the stop of the session VISA character and the value it is 0xA.  You may need to perform this task via the VISA property node.

    3. playback VISA to read more bytes than you tell never expect to get.  VISA playback will stop reading when it detects the termination character (End Of Line).

  • How to read the values of the variables of façade in loops without using local variables or property value nodes?

    I know that local variables and nodes of property value are causing a lot of problems.

    But if I read the value of a variable front outside a loop.

    the value is only read once before the start of the loop.

    Changed the front variable values during the iterations of the loop, is invisible.

    How can I solve this problem?


  • How to create the point number fixed scripted LabVIEW VI

    Hello

    How can I create a LabVIEW VI scripted fixed-point number? And set the word length and the length of whole word?


  • Hello! Bought 4 years ago Adobe Photoshop, do not remember on which registered mail, on any phone number. There is license number, I can give the Passport information. I need this Photoshop installed on another computer.

    Hello! Bought 4 years ago Adobe Photoshop, do not remember on which registered mail, on any phone number. There is license number, I can give the Passport information. I need this Photoshop installed on another computer.

    Download and Installation Help-

    https://helpx.Adobe.com/download-install.html

    http://www.Adobe.com/downloads/other-downloads.html

  • I uninstalled Acrobat Reader DC for permanently froze running on Windows 8.1. I downloaded the older version (Acrobat Reader XI), but now require a serial number to install it. Where can I get this number? Please help

    I uninstalled Acrobat Reader DC for permanently froze running on Windows 8.1. I downloaded the older version (Acrobat Reader XI), but now require a serial number to install it. Where can I get this number? Please help

    Hello

    What exactly are you installing?

    Reader is a free software from Adobe and doesn't require any software license serial number.

    It seems that you download Acrobat.

    There is not Acrobat Reader XI.

    He ' Acrobat or Reader XI XI.

    Please visit the following link to install the XI player.

    Concerning

    Sukrit diallo

  • Performance of Modbus using DSC static Variables

    I'm fairly new to using Modbus with LabVIEW.  On some dozens tools and APIs that can be used for a project, I train, I decided to try using an alias of shared Variables in Modbus registers in the project, which is a tool of DSC.  It seemed like a smart to go way.  I used Variables shared in the past, however, and I am aware of some of the questions that surround them, especially when the number of them begins to increase.  I will have only about 120 variables, so I don't think that's not too bad, but I'm getting a little worried...

    The way I started to do this was to create a new shared variable for each data point.  What I have noticed since then is that there is a mechanism to process multiple records at once using a table of values.  (Unfortunately, even if I wanted to use the table method, I probably couldn't.)  Modbus points that I am interfacing are for a custom device and the programmer does not disturb the consecutive use records...)  But anyway, I was wondering what might be performance issues that surround this API.

    I guess:
    (1) all caveates of shared variables apply.  These are really shared variables, but only DSC taught the engine of the SV to go read.  Is this fair?

    And I wonder:

    (2) there is no improvement in performance for reading a table of variables consecutive rather than reading each variable individually?

    (3) there performance above problems what shared variables have normally when you use Modbus specifically?  (E.g. how many times can you read a few hundred points of the device even Modbus?)

    Thank you

    DaveT

    Hi Dave,.

    Thanks for your good questions!

    (1) you are right that the caveates of shared variables apply. Generally, the major issues (conditions of race etc.) are not met because these variables are generally used as I/O.

    (2) with a large number of shared variables that are located on separate machines, it is best to use a table. However, with 120 variables read consecutively will not affect your overall performance, especially if you don't need to read everything at the same time.

    (3) overall, there is no any concerns of performance outside normal common variable concerns. Modbus and DSC are designed to be efficient and do a good job to maximize performance for you.

    I hope this helps.

    Best regards

    Anna L

  • Not recognize variable in number

    Hello

    Let's see if I can explain what I'm trying to do, and what the problem is.

    Basically, I'm telling a symbol to be moved from its current position to another. But rather than put a number behind symbol._x = I placed a variable. For some reason, the symbol won't spend the number of coordinate x which is stored in the variable.
    Why not??? I used a trace on the variable which reads a number, and I also replaced the variable behind the _x with a regular number in which case the symbol moves...

    More background and code:
    I have an XML that stores the coordinates x and y for the various items in the database of the file.
    All the information from the XML file are stored in an array,
    Example of XML data:
    < person >
    < name > Fred < / name >
    < profession > Baker < / profession >
    < > 150 xcoordinate < / xcoordinate >
    < ycoordinate > 25 < / ycoordinate >
    < / person >
    < person >
    ...

    The table looks like this:
    var aPerson:Array = new Array();
    var xPersonData:XML = new XML();
    xPersonData.ignoreWhite = true;
    xPersonData.load ("People.xml");
    xPersonData.onLoad = {function (success:Boolean)}
    If (success) {}
    var numPeople:Number = xPersonData.firstChild.childNodes.length;
    for (var i: Number = 0; i < numPeople; i ++) {}
    Missing [i] = new Object();
    Missing [i] .personName = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [0] .firstChild;
    .profession missing [i] = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [1] .firstChild;
    Missing [i] .xmap = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [2] .firstChild;
    Missing [i] .ymap = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [3] .firstChild;
    }

    Later depending on the button you press on the following code is supposed to load some information about the selected person, as well as move a circular symbol pin specific x / coordinate on top a card:

    LoadPic = function (imageNumber) {}
    XCO missing = [imageNumber] .xmap;
    yco missing = [imageNumber] .ymap;
    trace (XCO);
    trace (yco);
    mc_largeImage.txt_name. Text missing = [imageNumber] .personName;
    mc_largeImage.txt_profession.htmlText = .to go missing [imageNumber];
    mc_largeImage.mc_map.mc_pinmap._x = xco;
    mc_largeImage.mc_map.mc_pinmap._y = yco;
    }

    If I use the XML example above, the trace of the two variables (xco and yco) reads 150 and 25, but the symbol does not move anywhere. If I replace the xco behind mc_largeImage.mc_map.mc_pinmap._x = with a number, that it moves to a different location. So it is not a question of not speaking correctly the symbol...

    THEN! What happens here? Can someone help me please?
    Is there something special about the number stored in a table? It don't think it's a chain and not a number?

    Would be grateful if someone could point me in the right direction :-)
    Thank you
    JJ

    The content of the XML textNodes is of type String. And to get there, you need to use the nodeValue property for textNodes. Otherwise, which you access is actually an XMLNode, which traces OK using its ToString method (which automatically trace uses), but don't not provide you the string value if you use it in the code. In fact using toString() or nodeValue property should also work well here.
    If the numbers you read in your xmap and ymap person your object properties are of type XMLNode.
    To get the string values and then convert them to numbers, try to change the following two lines:

    Missing [i] .xmap = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [2] .firstChild;
    Missing [i] .ymap = xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [3] .firstChild;

    Replace:

    Missing [i] .xmap = number (xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [2].firstChild.nodeValue);
    Missing [i] .ymap = number (xPersonData.firstChild.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [3].firstChild.nodeValue);

  • read the value of the variable knowing only one name

    Is there a way to read a variable value of knowing only the label name? I have 11 Labview and am to read a text file with a list of variable labels and try to read the value without having to create a structure of matter of hundreds of variables.

    Are we willing?

  • Readed hexadecimal string converted to a decimal number.

    Hello! I do a vi to check the hours of the lamp of my Sony projector. I send a hexadecimal command which is: A901 dignitaries 1301 0000 139 a senators. When the projector receives answer with 1901 1302 0031 339. 0031 corresponds to the data that I need to convert it to decimal because it tells me how many hours we used the lamp. How can I get this read-separated string to get only the third part of hexadecimal numbers converted to decimal? Thanks in advance!

    Hey rounded!

    As the data is in a format string, the hexadecimal number VI string should work well in this case.

    To enter only a single figure of this string to use in the hexadecimal number string VI, then I suggest using the string subset VI; Returns a specified segment of a string. By changing the offset of entry which determines which part of the string data is beginning to be analyzed from and changing the length to control the amount of characters to analyze, you will be able to enter the character that you want to convert.

    Kind regards

  • Read MODBUS registers

    Hi all

    I have been more manuals/son using the Modbus Library to communicate through series. However, I'm not sure what exactly I am doing wrong. If I use a program like Modbus Poll and send 02 03 00 02 00 02 65 F8 I get a response: 02 03 04 39 20 90 D5 F9 3F. Looking at the manual for the device that I'm communicating with (a pressure transmitter), the application is in the following format:

    02 - address

    03 - function

    00 - StAdd H

    02 StAdd L

    00 - reg #:

    02 # reg L

    65 CRC16 L

    F8 - H CRC16

    The answer is in this format:

    02 - address

    03 - function

    04. # of bytes

    39 data:

    20 - data L

    3F - data:

    90 data L

    D5 - L CRC16

    F9 - H CRC16

    So, in LabVIEW, this is how I have it Setup:

    I put the 'Start' address to 1 because I have read, there must be in LabVIEW 1 less than what the actual starting address is (n - 1). I expect the same reply as above using Modbus Poll. In the diagram above, I get the following registers, starting at index 0: 256, 661, 63490 33538

    Obviously the answer is not in hexadecimal as above, but it is nowhere near what it should be.

    Thanks for the help!


Maybe you are looking for