Modbus (DSC Module) - Illegal Data Address

Hi
I need to implement a Modbus Slave in an application on a cRIO system. I set up a "I/O server" (DSC Module) and created shared variables for all the registers I need. The Slave has been tested and works fine, I'm using about 20 holding registers and I'm able to both read from and write to them.
The issue is that when the Modbus Master reads a holding register that I have not implemented the slave replies with the value "0x00 0x00" (LabVIEW default for integer) and not with exception response code 02 (a holding register inquiry for a nonexistent address should reply with function 0x83 and code 0x02 - Illegal Data Address).
Is it possible to change a setting or something, in order to force the DSC Module to send an exception response code, in stead of simply a default value, for registers that are not specifically configured?
Hope someone can help me - I would really like not to write all the necessary code for a modbus slave myself.

Hi Lenvno
Thanks for your reply.
I think you misunderstood me.
I have an application running on a cRIO. On this cRIO I need to implement a Modbus Slave in which specific holding registers should be used. Through a serial connection a different device, acting as a Modbus Master, obtains information from this slave.
On the cRIO, in my LabVIEW application, I have created an I/O server - Modbus Slave. Using shared variables I write values to specific holding registers on the Modbus Slave.
The Modbus Master obtains the values from these registers using function code 0x03, read holding register - this works correctly. However, when the Modbus master query registers that I have not defined, the I/O server on the cRIO replies with a register value of 0, instead of Illegal Data Address. It seems like when using this I/O server, all possible Modbus registers is filled with the LabVIEW default value and the slave therefore always will reply with a value even if the register is not used.
My question is therefore, how can i change this? If the Master query a register that I am not writing to (and is therefore unused), I would like the slave to reply with "Exception Response" code 0x02 - "Illegal Data Address", and not just the value of 0. 
/Simon

Similar Messages

  • How can I solve the problem, which is shown as Modbus exception response 2 (illegal data address) in lookout protocol driver?

    I have a Dynisco UPR700 instrument that has a modbus communication protocol, I use the lookout protocol driver modbus to communicate with it, but the lookout protocol driver gave me the information about "modbus exception response 2 (illegal data address)", how can I solve this problem? where can I set the right data address? Thanks!

    Most likely you are trying to access a datamember address that is either not supported or non-existant on the UPR700.
    Double check the address that you are writing/reading and make sure that it is supported.
    Regards,
    Chad Evans

  • Dsc module modbus server handling uint8 variables

    Hello!
    I have a problem with handling Modbus uint8 variables in the dsc module . Unit8 Shared variables
    are available in labview but Modbus i/o server Unit8 variables are not:
    http://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/dsc_modbus_using/
    In our controller we split some 16 bit modbus registers into two 8 bit variables to pack some more usefull data in there. 
    All of my shared variables are running nicely in the shared variable engine but I've no way of
    easily binding them to my Modbus i/o server uint8 variables easily.
    Any ideas?
    I like the auto-scaling logging and binding of the DSC module shared variables
    so I want to avoid some manual labview processes.
    I want to view all shared variables in my front ponel at run time. I have 300+ variables so I'm trying to avoiding manual one-off hacks.
    James

    jamesy777, 
    The reason Unit8 variables are not available in the Modbus I/O sever is the nature of the I/O server data types compatible with the registers. If you’re writing to two registers, you can just read those two separate registers as U16s in LabVIEW. Otherwise, if you’re writing to the upper and lower half of the register, you can split the register into its 8-bit halves using the Split Number function in LabVIEW.
    Split Number Function - http://zone.ni.com/reference/en-XX/help/371361L-01/glang/split_number/
    Regards, 
     

  • LabView 2014 - DSC module with Ethernet Modbus: Error 56

    Sorry,
    I try to connect modbus by Labview 2014 DSC module like this figure, and it occurred error code 56 at "Read Input Registers",
    I have look for many soluctions, but still fail, can someone help me? thank you very much!

    Did you confirm the address and port of your slave device is correct? Also, is your device a modbus master device or slave device?
    I suggest you to read the help first, and then run the corresponding example
    You can run the two example to test if the modbus function is OK. Then you can come back to test your third party device.

  • Multiple errors with DSC modules modbus master and slave

    Hi,
    I've searched quite a lot of posts but haven't found solution for my problem. I'm playing with LabVIEW DSC module and it's modbus master and slave functionalities. Even the LabVIEWs own modbus examples (Modbus Simulator and Fundamentals) seem to work randomly or not at all: When checking the Variable Manager utility Modbus Simulator (i.e. modbus slave/server) seems to deploy variables correctly with good quality but Modbus Fundamentals (i.e. modbus master/client) most often shows unknown value or bad quality for all the variables. When running the VIs I get 'Error -1950679035 Unable to locate variable in the Shared Variable Engine' and sometimes some other errors too. If the Modbus Simulator (slave/server) is expected to work fine I guess I should get two slaves communicating, but this isn't happening either. So maybe Modbus Simulator example isn't working either.
    I've tried undeploying and deploying the libraries, stopping and starting the SVE, booting PC, reinstalling DSC module, and setting firewall and antivirus software off. This problem is going on with two different computers, both of which have recently installed LabVIEW 2011, first PC with Win XP and second PC with Win 7. No other OPC servers should be installed to these computers. And what is really interesting, the problem seems to have nothing to do with my network since Simulator and Fundamentals examples are not working even if the network cable is unplugged!
    Any suggestions? Replies are highly appreciated!

    V8 has the same feature, but the words are different.
    The Generator typically uses the Driver time base, and the Gl. Var Write is writing once per block.
    So, to see all values, you must have a block size of one.
    I set up the Driver timebase to 10 Hz, block size of 1. The Generator and the Read Variable default to the Driver timebase.
    The Generator is making a 2 Hz Rectangle waveform. YOu can see that it's shifted, but otherwise intact.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Is it possible to connect labview with opc server without using NI dsc Module ?

    Hellow sir,
    I want to get data over labview using OPC server and i am not using any dsc module vi (Alams, print, GUI, security).I am using share variable to get data from OPC server to labview. Now i want to deploy that application to third party computer. (where there is no NI software is installed)
    i am using labview 8.6 and 2009.
    Many ? like....
    1) what is the procedure to install that application in third party computer.
    2) Do i need to use my dsc run time licence..?
    waiting for your valuable feed back.
    Thank you.
    CLAD
    Labiew programmer

    Hi, When you connect to NI OPC Server by creating New I/O Server > OPC Client. You will see all registered OPC Servers running on local machine or remote machine. I used KepServerEx from Kepware and LSIS OPC Server from LG with no problems. Just make sure that the OPC server is running.
    Hope it helps
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology
    Attachments:
    LG.png ‏57 KB

  • LK6.5 Modbus read/write to many addresses at once

    LK6.5 Modbus read/write to many addresses at once. What happens as example; I have address 100 to 150 and 180-200. Addresses in between doesn't exist. Not all are connected. The modbus (Ethernet master) driver reads in a single command (in order to optimize) address 100-190.
    That is a nice feature, but the result is a reply like "not existing" because between 150-180 are not existing. No error is shown in lookout (communication works OK).
    I know I can do a workaround by setting maximum value per message to 1 or 2, but the project has 140 modbus objects with a total of around 4000 connections. I would like to use a big range in one command, but no addresses that are not existing. Beside of that, it looks like this is a problem that let the driver and/or lookout crash.
    Any one knows a fast solution? Is there another updated modbus driver?

    more inputs:
    The response from Modbus device actually doesn't specify which address has the problem if you read a range.
    When you read a range, and a certain address in this range doesn't exist, do you get no data in lookout?
    It depends on the Modbus device whether lookout gets error response or the good response. I don't see detailed definition in the Modbus specification. So, if a certain address in a range doesn't exist, the device may either return error or good response. But the problem is that the error reponse is just an error code. Lookout doesn't know which address has the problem. It may be a problem that you don't see alarm in Lookout.
    I don't see a way on lookout side to get a better behaviour. Maybe you can consult the device provider for any advice, such as what should the modbus master do, is the range read expected?
    Ryan Shi
    National Instruments

  • Cannot view PDF forms (with Signature) in Workspace Error : "SigDict/Contents illegal data"

    Hello,
    With Jasmin's help, I am able to import a PDF form which is digitally signed >> view it in Workspace >> click Approve/Decline for archiving. Thanks Jasmin !
    When I view the form in workspace, I get a "Atleast one signature is invalid" prompt on the top left corner of the window. Upon clicking the "Signature Panel", it says "The Signature is invalid" with a description of "SigDict/Contents illegal data"
    Once the process is complete, I am unable to open the same form. I get an error message in Adobe Reader (within workspace).
    "Adobe Reader could not open '_7358722841708390983-102[1]' because it is either not a supported file type or because the file has been damaged ( for example, it was sent as an email attachments and wasn't correctly decoded)"
    Any help will be highly appreciated.
    Aditya

    For everyone's reference.
    I figured out the "Signature is Invalid" message.
    This was my fault as I used a Form Augmenter (insert form bridge) to a signed form which broke the PDF.
    After removing that module, I no longer got that message. However, once I approve the form I could no loner view it and I would still get an error.
    "Adobe Reader could not open '_7358722841708390983-102[1]' because it is either not a supported file type or because the file has been damaged ( for example, it was sent as an email attachments and wasn't correctly decoded)"
    Anyone know why ?
    Aditya

  • FDA CFR 21 Part 11 using DSC Module

    I am implementing an application using the DSC Module that needs to comply with the regulations for digital signature etc. according to FDA CFR 21 Part 11. I have been reading the tutorial:  Using LabVIEW to Create FDA 21 CFR 11 Compliant Applications and it explains how to comply to the different sections of the regulation. Most of it is pretty straight forward, however when it comes to signature manifestation there is very little information on how this should be done? There is no explanation on how a signature can be tied to data that has been collected or how a signature is suppose to be stored (other than that it can be written to the database)?
    Is there anyone that has implemeted this using the DSC module that can provide me with some design ideas?
    Best regards,
    Bjorn Larsson  

    Hi Joe,
    Thanks for your response.
    The problem is more of a design issue. I have gone through the training material and the tutorials for FDA CFR 21 part 11 and do not clearly understand how to manifest the signature or how a signature is related to logged data.
    Below is an excerpt from the http://zone.ni.com/devzone/cda/tut/p/id/4570 : My comments or questions are in red.  
    11.50 Signature Manifestations
    (a) Signed electronic records shall contain information associated with the signing that clearly indicates all of the following:
    (1) The printed name of the signer.
    You can programmatically get the printed name of the signer and log this information to the database.
    This is no problem I know where to get the login name. But not how to log it to the database? Should I create a shared variable with type string and enable logging? It is not really ideal to log this to the Citadel because it is more of an event and is better suited in an relation database? It is unclear what the author of the document ment with "the database".  Is it the Citadel or just a user designed database?  
    (2) The date and time the signature was executed.
    The date and time is attached to all data logged to the database.
    This implies that the signature should be logged to the Citadel database?
    (3) The meaning (such as review, approval, responsibility, or authorship) associated with the signature.
    You can design the application so that when a user applies an electronic signature, he/she must choose the meaning of the signature from a list, such as review, approval, responsibility, or authorship. The DSC module can write these meanings to the database with the signature.
    Again this refers to "the database" as if it was obvious? It is simple to add a combobox with meanings, but this is better implemented using a relation database since the meaning needs to be attached to the name and date? 
    (b) The items identified in paragraphs (a)(1), (a)(2), and (a)(3) of this section shall be subject to the same controls as for electronic records and shall be included as part of any human readable form of the electronic record (such as electronic or printout).
    All the information in part (a) of this section is written to the database. Therefore, you can use SQL queries or MAX to retrieve it in the same way you can retrieve all other data written to the database.
    Here the author implies that the signature is stored in a relation database and retrieved by SQL queries? Also there is no explanation on how a signature is tied to logged data? In other words, a user needs to know what he applies his signature to? Is a dataset or a time interval or something else? How can a user find out what data that has been signed and what has not been signed?
    Please let me know if I have completely misuderstood or missed some built in functionality of the DSC module that makes signature manifestation easy?
    Best regards,
    Bjorn

  • Questions re: Licensing & Feature Availability of the DSC module

    Hello,
    I transferred a project to another development PC. When I opened it, some of my network shared variables (NSV's) were flagged with Feature Errors: "Initial Value: Not licensed or cannot be edited outside of LabVIEW." I found out that it's because I didn't install the DSC Module on the newer machine; removing the "initial value" feature made the error message disappear.
    That error itself wasn't a big deal, but it got me thinking and investigating. http://www.ni.com/white-paper/4679/en says:
    If you want to use the features of the LabVIEW DSC Module, you must host the shared variables on Windows. The LabVIEW DSC Module adds the following functionality to network-published shared variables:
    · Historical logging to NI Citadel database.
    · Networked alarms and alarm logging.
    · Scaling.
    · User-based security.
    · Initial value.
    · The ability to create custom I/O servers.
    · Integration of the LabVIEW event structure with the shared variable.
    · LabVIEW VIs to programmatically control all aspects of shared variables and the shared variable engine.
    Question 1
    I did not realize that the Initial Value feature was part of the DSC Module. If I use it in a project, does that mean that my customer would need to buy a DSC runtime license? (I'm not using any other DSC feature)
    Question 2
    In my project, the NSV's in question were hosted on a cRIO target, yet my prototype (which had Initial Value enabled) ran happily without issues. This contradicts the documentation above which says "you must host the shared variables on Windows". Is this expected?
    Question 3
    I created a new NSV on my new machine (which doesn't have DSC installed). I saw the "Scaling" option. Is Scaling part of the DSC module or not?
    Question 4
    Initial Value and Scaling are generic features, unrelated to data logging/supervisory control. Why are they in the DSC Module? Should they not be in the base SV Engine?
    Solved!
    Go to Solution.

    Hi,
    1. Yes, any build that uses DSC features require a runtime license.
    2. That's a recommendation for more reliable operations.
    3. No, it is a native LabVIEW capability. The DSC modules simply adds more features regarding communication to protocols, alarming, etc
    4. Initial value, Yes. Scaling, no. I believe is for easy access. Old school method is the one shown in here at the section "Initialize Your Shared Variables".
    For more information about DSC visit this page.
    Alejandro | Academic Program Engineer | National Instruments

  • How do I send modulated FSK Data using modulation toolkit

    I am trying to create modulated FSK data using the Modulation toolkit.
    I found the example VI "MT RFSG Generate FSK.vi".
    This example sends continuous CW data.
    I need to control the data that is being sent.
    Sending data from a file or an array in LabVIEW would be great.
    I would also like to be able to be able to continually stream known data such as "55" or "AA" hex.
    I'm trying to do a receive sensitivity test, so I want to stream known data out to my DUT. Then
    keep reducing the power until the DUT that is receiving the data starts dropping BITS.

    Hi
    The bit stream use to generate the FSK signal in this example is a pseudo random sequence.  If you go inside the custom subvi “mod_Create Continuous FSK” you can see how the example generates the bit stream.
    As you can see in the picture the subvis use to generate the FSK signal are called “MT Generate Filter Coefficients”: Calculates filter coefficients for pulse shaping and matched filters applied by the digital modulation and demodulation VIs. The calculated filter coefficients are used during modulation to reduce the bandwidth of the transmitted signal, and during demodulation to reduce intersymbol interference. The other function is call “MT Modulate FSK”: Inputs a sequence of data bits, performs FSK modulation, and returns the modulated complex baseband waveform in the output complex waveform parameter.
    A similar case liek yours was addressed by one of my partners. He developed a simple example that generates the FSK signal from an 8 bit integer array. Please take a look at the examples.
    A very good resource is the article in Devzone: RF Hardware Example: Frequency Shift Keying. 
    Message Edited by Jaime F on 02-13-2008 07:07 PM
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters
    Attachments:
    fsk01.png ‏115 KB
    fsk02.png ‏112 KB

  • Dsc why the data lost after two days?

    hi:
    I have found some question about DSC module like the picture you see ,there are two lines. ONE is white ,the other is blue.The white one has lost at some place,but the blue one was continuous.
    As I know,the computer was crashed at August 25,but the data loss occurred in August 23.It's a long time.So can anybody tell me why it happened.
    Attachments:
    untitled.png ‏3915 KB

    What is the data? What is displaying the data (graph or chart)? What does your code look like? Why did you post a 4M image to the forum?
    NaN in the data will appear as gaps in plots.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • I would like to mark data on my iPhone / iPad as private or hide it. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apl pdts

    I would like to mark data on my iPhone / iPad as private or hide it and only unlock it with a different password. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apple products.

    I know what you meant. As I said, it's not possible to do so on the iPhone. Of course Apple could add such a feature to a future version of iOS, it's only software, but so far they haven't. You can suggest such a feature to Apple here: http://www.apple.com/feedback/iphone.html

Maybe you are looking for

  • Acrobat 9.0 Pro - Blurred printing

    Starting last week, any pdfs with colour in them that I have tried to print to either of my printers (one a laser Toshiba, the other an inkjet HP) come out with the text all blurred.  I have attached an example of a pdf I tried to print.  They don't

  • Alert in VC

    Hi all      I want to display an alert in my model. How can i do this? Can u help me? Thanks &Regards Hemalatha

  • Quad wakes, screen doesn't!

    A few moments ago, I woke my Quad from sleep. The machine fired up fine (no roaring fans or anything), but the screen stayed black. Tried unplugging, plugging the power for the display, unplugging, plugging display USB connector etc. Nothing. It's a

  • I bought an iPod from someone and its disabled and i dont have the primary computer

    I have no idea on what to do i got the ipod and it was disable and when i connected it to my iTunes it told me to connect it to its primary computer. It is an old iPod it is probably a first or second generation

  • Error message U43MID207

    I am getting a message when I try to update my Photoshop Elements 7 and 9 or 9.0.1...what is this message mean...my email address is [email protected] my name is George Dolan