Need help with read/write to MODBUS RTU registers in Labview 8.0

I’m trying to write and read the registers in G3800xx016. controlling temperatures and lightning.  Please look at the attached pdf file for this unit..
I have used Lookout for about three years, and it works fine.. Now I want to expand my system and try to use Labview 8.0
My temperature register start adress is 100 Hex  (256 dec) I read from Register with Function code 03.
This register have values from 0-255 witch mean in labview for me as unsigned byte U8
I read my temperature from the register like this: eks.: 40257 lets say value=5
Slave    FC       Start Adress     Byte     Value               CRC
01        03        0100                02        0005                7847   
This is the status received from the Modbus tester when I use null-modem connection..
I receive the same value if I use Modscan32
I have used null-modem cable to read out the values.
I have also PIR detectors that control movements and light of and on, and I read these starts at 40017.1
01   03     0010     02    
The register to switch on and of heating and lights starts at 404097.1  FC16  
Values mention here is read from Lookout 5.0  
I have tried examples and read for weeks about this, but everything stops when I try to use Labview 8.0    I can’t read any values from my Master unit, neither write to it, or read any values in Modbus testers when I use null-modem cable.. I have tried different baud rates in my serial connection and it works perfect in Lookout, but Not Labview..
I have even bought DSC module, but I can’t write to either com ports or Modbus testers..
Please anybody… is there anybody that can give me help with this??
Start address for for PIR detectors is 40017.1 (FC03)  and for writing bits for on of to light and heatsystem is 404097.1 (FC16)
I would be very happy for any idea that can give me some positive results…  Look at the attached pdf file.
Thanks.. and very best regards from
Benjii…
Attachments:
G3800x016_02-2005_eng.pdf ‏70 KB

Hi... and thanks for your answer..
Yes, I have downloaded the NI Modbus drivers.. I have downloaded that one + a lot of other things about Modbus..
I have also tried communication between lokout and labview true null-modem cable.. and it works..
I have tried several Modbus examples and I communicate with most of them with null-modem cable.
I write to the right registers as well, cause I use Modbus scanner to read the information..
I have used the same settings for serial communication as my Master device use, bust still I can't get any response..
There was an error message in one of my example from the Modbus INIT module.. Maybe I should try to set up a new connection using VISA ??
Maybe the problem is to INIT my serial port? I have tried restarting my computer after closing my system..  But still, I have the same problem..
I hope you can give me any idea...
Thanks again..  by the way.. is it possible to write and read directly to serial port with the DSC module??  If so.. how?? 
Very best regards..
Benjii..

Similar Messages

  • Help with Read/Write File

    hi I was wondering if someone can help me do some read/write file with java. here is what I want to do:
    Read a file and search the whole file for a word such as "throw" and print out the rest of that line to a new file. in the case of "throw", i want to link all thrown exceptions to the file that contained them.
    can someone help me out and let me know what way I can approach in this?
    any help would be greatly appreciated.
    thanks!

    Rough and dirty, here's a class that will read a file and return a resultset:
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.FileChannel;
    import java.util.*;
    import java.text.DateFormat;
    public class Utils{
         File fileName;
         FileOutputStream outputFile;
         boolean closeChannel;
         //Constructor
         public Utils(String directory, String filename){
              String strFileDir = directory;
              String strFileName = filename;          
              File fileDir = new File(strFileDir);
              fileName = new File(fileDir, strFileName);
              // If directory does not exhist, create it.
              if(!fileDir.isDirectory()){
                   if(fileDir.mkdirs()){
                        System.out.println(fileDir + " created.");
                   else{
                        System.out.println(fileDir + " could not be created.");                    
    public ArrayList readText() throws IOException{          
              // Read content of file into a collection
              ArrayList arrayList = new ArrayList();
              try{
                   BufferedReader in = new BufferedReader(new FileReader(fileName));
                   String line;
                   while((line = in.readLine()) != null){
                        arrayList.add(line);
                   in.close();               
              catch (IOException ex){
                   throw ex;
              return arrayList;          
         }And here's how you use the class:
    // Create a new Disk Utilities object.  This can be used for all subsequent read/writes to this file.
              Utils utilTest = new Utils("e:/testing", "Testing.txt");
    // Create a collection to hold the data from the file.
              ArrayList arrayList = new ArrayList();
              try{arrayList = utilTest.readText();}catch(IOException ex){ex.printStackTrace(System.err);}

  • Need help with reading RSS feed from SSIS

    Hi all,
    I am trying to read RSS feed from SSIS by using the Script Component. So far I am able to read some information from the RSS feed from the following items included in the code, Title, PublishDate, LastUpdateTime, Id and Summary.
    There are still more item but I am unable to identify the proper data type for the following:
    //Output0Buffer.Description = item.Content;
    //Output0Buffer.Category = item.Categories;
    //Output0Buffer.Comments = item.Summary;
    //Output0Buffer.Source = item.SourceFeed;
    When I define the data for item.Content as Unicode String in the column properties for the Output column I get the following error message:
    Error 1 Cannot implicitly convert type 'System.ServiceModel.Syndication.SyndicationContent' to 'string'
    And the same error for the other three variables.
    I am using HTTP Connection manager to read the xml link.
    I tried to google around for some help but I could not find more information about the datatype.
    I appreciate any help if someone can point me to the right solution for reading RSS feed from SSIS.
    Code:
    /* Microsoft SQL Server Integration Services Script Component
    * Write scripts using Microsoft Visual C# 2008.
    * ScriptMain is the entry point class of the script.*/
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.ServiceModel.Syndication;
    using System.Xml;
    using System.Text;
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    private string url = string.Empty;
    private SyndicationFeed feed = null;
    private XmlReader reader = null;
    public override void PreExecute()
    base.PreExecute();
    // Get the URL from the Http Connection Manager.
    // Note, we're not actually using the connection manager's connection object,
    // just it's URL setting. This is because using the .NET connection classes
    // give us more flexibility.
    reader = XmlReader.Create(Connections.HttpConnection.ConnectionString);
    feed = SyndicationFeed.Load(reader);
    public override void PostExecute()
    base.PostExecute();
    reader.Close();
    public override void CreateNewOutputRows()
    if (feed != null)
    foreach (var item in feed.Items)
    Output0Buffer.AddRow();
    Output0Buffer.Title = item.Title.Text;
    Output0Buffer.PublishDate = item.PublishDate;
    Output0Buffer.LastUpdatedTime = item.LastUpdatedTime;
    Output0Buffer.Link = item.Id;
    //Output0Buffer.Description = item.Content;
    //Output0Buffer.Category = item.Categories;
    //Output0Buffer.Comments = item.Summary;
    //Output0Buffer.Source = item.SourceFeed;
    Output0Buffer.FeedImage.AddBlobData(ConvertToBytes(item.Summary));
    string authorName = string.Empty;
    if (item.Authors.Count > 0)
    // take the first author
    authorName = item.Authors[0].Name;
    Output0Buffer.Author = authorName;
    Output0Buffer.SetEndOfRowset();
    private byte[] ConvertToBytes(TextSyndicationContent content)
    if (content != null && !string.IsNullOrEmpty(content.Text))
    // convert the string buffer to UTF8 so we can store it in an NTEXT column
    var encoding = new UTF8Encoding();
    return encoding.GetBytes(content.Text);
    return new byte[0];
    Thanks in return.

    You need to make it running outside SSIS 1st. I just do not see why you need to publish it here at the moment.
    And to solve it, doesn't C# has the
    VAR datatype so you do not have to guess.
    Arthur
    MyBlog
    Twitter

  • Need help with reading XML using File Adapter

    I have created a simple BPEL process that uses a file adapter to read files containing XML messages of a simple xsd schema. But when reading the xml, I get the following error message:
    [2010/03/01 23:43:13] Invalid data: The value for variable "Receive_1_Read_InputVariable", part "revision-report" does not match the schema definition for this part.The invalid xml document is shown below: More...
    [2010/03/01 23:43:13] "{http://schemas.oracle.com/bpel/extension}invalidVariables" has been thrown. less
    -<invalidVariables xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>
    9710
    </code>
    </part>
    -<part name="summary">
    <summary>
    Invalid xml document.
    According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-complex-type.4: Attribute 'doc' must appear on element 'revision-report'.
    Error::cvc-complex-type.4: Attribute 'model' must appear on element 'revision-report'.
    Error::cvc-complex-type.4: Attribute 'pubdate' must appear on element 'revision-report'.
    Error::cvc-complex-type.2.4.b: The content of element 'revision-report' is not complete. One of '{"http://xmlns.oracle.com/xmlfile":alternategroup}' is expected.
    Please make sure that the xml document is valid against your schemas.
    </summary>
    </part>
    </invalidVariables>
    It seems that there is some issue with the namespace, but even after trying out various combinations, I am not able to resolve this.
    Here the message schema (xsd):
    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/xmlfile"
    xmlns:tns="http://xmlns.oracle.com/xmlfile"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="revision-report">
    <xs:complexType>
    <xs:sequence maxOccurs="unbounded">
    <xs:element name="alternategroup">
    <xs:complexType>
    <xs:attribute name="name" use="required" type="xs:string"/>
    <xs:attribute name="Desc" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="doc" use="required" type="xs:string"/>
    <xs:attribute name="model" use="required" type="xs:string"/>
    <xs:attribute name="pubdate" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    And here is the xml file to be read by the file adapter:
    <?xml version="1.0" encoding="UTF-8" ?>
    <revision-report doc="doc2" model="model4" pubdate="pubdate5">
    <alternategroup Name="ABC" Desc="ABC-Desc">
    </alternategroup>
    <alternategroup Name="DEF" Desc="DEF-Desc">
    </alternategroup>
    <alternategroup Name="GHI" Desc="GHI-Desc">
    </alternategroup>
    </revision-report>
    Appreciate any help.
    Thanks in advance for your attention.
    Jay

    Thanks for your response.
    I am not sure if there is any easier way, but I tried out the following tool available on the net to check an xml against a xsd:
    http://tools.decisionsoft.com/schemaValidate/
    There were a few issues, that I corrected and finally had a xsd and xml that were matching and valid. I tried this out in my file reading BPEL process, but the error still remained the same!
    Here is my updated/simplified xsd and xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/xmlfile"
    xmlns:tns="http://xmlns.oracle.com/xmlfile"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://xmlns.oracle.com/xmlfile">
    <xs:element name="revision-report">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" ref="alternategroup"/>
    </xs:sequence>
    <xs:attribute name="doc" use="required" type="xs:string"/>
    <xs:attribute name="model" use="required" type="xs:string"/>
    <xs:attribute name="pubdate" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="alternategroup">
    <xs:complexType>
    <xs:attribute name="Name" use="required" type="xs:string"/>
    <xs:attribute name="Desc" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <?xml version="1.0" encoding="UTF-8" ?>
    <revision-report doc="doc2" model="model4" pubdate="pubdate5" xmlns="http://xmlns.oracle.com/xmlfile">
    <alternategroup Name="ABC" Desc="ABC-Desc"/>
    <alternategroup Name="DEF" Desc="DEF-Desc"/>
    <alternategroup Name="GHI" Desc="GHI-Desc"/>
    </revision-report>
    I even tried the option that is available in JDeveloper to generate a sample xml from a xsd (when in the context of a Transformation activity). The xml generated by this also seems exactly like the one above.
    So, I am not able to figure out why my BPEL process errors out with the message Invalid xml document.

  • Need help with reading a file

    Hello, I'm trying to read this file, but I keep getting a java.nullpointerexception at the end of it:
    Element: PART
    Content: (HEADER,CHAPTER+)
    Element: p
    Content: (#PCDATA)
    Element: INTRODUCTION
    Content: (HEADER,p+)+
    Element: CHAPTER_NUMBER
    Content: (#PCDATA)
    Element: HEADER
    Content: (#PCDATA)
    Element: BOOK
    Content: (OPENER,SUBTITLE?,INTRODUCTION?,(SECTION|PART)+)
    Element: SECTION
    Content: (HEADER,p+)
    Element: CHAPTER
    Content: (CHAPTER_NUMBER,CHAPTER_TEXT)
    Element: OPENER
    Content: (TITLE_TEXT)*
    Element: CHAPTER_TEXT
    Content: (p)+
    Element: SUBTITLE
    Content: (#PCDATA)
    Element: TITLE_TEXT
    Content: (#PCDATA)
    here is my code:
                           s = br.readLine();
                            while (s != null){
                                    node[i] = new Node();
                                    if (s.startsWith("Element: ")){
                                       node.element = s.substring(s.indexOf(":") + 2);
    System.out.println("Element[" + i + "]: " + node[i].element);
    else if (s.startsWith(" Content: ")){  
    node[i].content = s.substring(s.indexOf(":") + 2);
    System.out.println("Content[" + i + "]: " + node[i].content);
    s = br.readLine();
    if (s.startsWith("Element: ")) i++; //line 194 causes error
    br.close();
    here is my output
    Element[0]: PART
    Content[0]: (HEADER,CHAPTER+)
    Element[1]: p
    Content[1]: (#PCDATA)
    Element[2]: INTRODUCTION
    Content[2]: (HEADER,p+)+
    Element[3]: CHAPTER_NUMBER
    Content[3]: (#PCDATA)
    Element[4]: HEADER
    Content[4]: (#PCDATA)
    Element[5]: BOOK
    Content[5]: (OPENER,SUBTITLE?,INTRODUCTION?,(SECTION|PART)+)
    Element[6]: SECTION
    Content[6]: (HEADER,p+)
    Element[7]: CHAPTER
    Content[7]: (CHAPTER_NUMBER,CHAPTER_TEXT)
    Element[8]: OPENER
    Content[8]: (TITLE_TEXT)*
    Element[9]: CHAPTER_TEXT
    Content[9]: (p)+
    Element[10]: SUBTITLE
    Content[10]: (#PCDATA)
    Element[11]: TITLE_TEXT
    Content[11]: (#PCDATA)
    java.lang.NullPointerException
    at Test.readDTDObjectFile(Test.java:194)
    at Test.<init>(Test.java:143)
    at Test.main(Test.java:338)
    can anybody help me figure out how to fix this? thanks so much!

    nevermind, i figured it out. thanks anyway!

  • Need help with "reading" files ...

    Okay, here's the scoop in two versions ...
    The Short and Sweet:
    I'm VERY new to Java programming, but before I dedicate a lot of time into my project, I need to know first if it is possible for a java.class applet (running in a browser, online) to read from a text file located on the (remote) server - ie: the same server and path as the java.class applet is located.
    The Long and Confusing:
    The primary objective is to recursively read from a constantly changing data/text file (generated by a php script), then "parse" that data into certain variables which in turn affect the (browser) output viewed by the visitor. A simplified example of this would be to capture x-y coordinates generated by a perpetually running php script (via a "shared" text file), then the applet would use this "read" data to constantly update the x-y positions of two (or more) graphical objects within the running applet.
    Hope this makes sense. I'm not asking anybody to actually code this for me (though an example would be nice) ... I really just need to know if it can be done before delving into this somewhat paramount project. Thanks.
    --Mikey

    The Short and Sweet:
    I'm VERY new to Java programming, but before I
    dedicate a lot of time into my project, I need to know
    first if it is possible for a java.class applet
    (running in a browser, online) to read from a text
    file located on the (remote) server - ie: the same
    server and path as the java.class applet is located.
    It is possible to use an Applet to read a file from the server, but you need to use a URL stream, not a file stream because of the Applet security constraints. Applet.getCodeBase() will return the URL of the directory where the Applet is. You can use the URL to create a URL to the file. Then read the new URL's InputStream.

  • Need help with reading a midi file!!!

    I want to be able to make a java program that can read midi files. I need to know what notes are played and when. how can i do this.
    A bit of code would be nice to to use as a resource.
    thnx

    http://java.sun.com/products/java-media/sound/
    There are links to code samples and maybe a tutorial

  • Need help with reading email

    I have had my Blackberry only a few days, but was doing fine.  All was set up correctly, but for some reason I was snooping around and evidently have changed something. Now, I can't select an individual email message to read. I can only select multiple messages and then when I click the track ball the only options are to delete, save, etc. Also, my suretype does not seem to be working now (although it is on). I also have an upwards, large arrow and "123" in my upper right hand screen that has not been there before. I know it might be something silly, but I appreciate any help or tips to resolve this.  I was really loving it until now. 
    Thanks!!!
    Kim

    take the battery out and put it back in. This should fix it.
    Click on KUDOS to appreciate our efforts and mark the thread RESOLVED if your issue is resolved.

  • I need help with reading user input

    Hi there, I have the following sql query:
    select v.veh_vin, v.veh_make, v.veh_model, v.veh_regonumber, c.cond_desc
    from vehicle v, condition c
    where v.cond_code = c.cond_code and v.br_no = &branch_number
    order by v.veh_make, v.veh_model;
    The query compiles fine, but when I'm prompted to input the value for "&branch_number", I get an error stating "invalid identifier". I make I input the value correctly, but I still keep getting an error. Can anyone tell me what I'm doing wrong? (v.br_no is a CHAR(4 byte) datatype, if this helps.)
    On an unrelated note, what's the difference between using only one ampersand, compared to using two ampersands? (ie. what's the difference between "&branch_number" and "&&branch_number"?)

    Are you providing a char-value? That is are you enclosing it between single quotes?
    You could also do this:
    select v.veh_vin, v.veh_make, v.veh_model, v.veh_regonumber, c.cond_desc
    from vehicle v, condition c
    where v.cond_code = c.cond_code and v.br_no = '&branch_number'
    order by v.veh_make, v.veh_model;Which prevents you from having to provide the quotes every time.
    The double ampersand will prevent being prompted twice (or as many times as the variable is used inside the query).
    Eg.
    select *
    from dual
    where &i = &i
    /Will prompt you twice to provide the value for i. Whereas:
    select *
    from dual
    where &&i = &&i
    /will only prompt you once.
    Toon

  • Need help with reader 11.0.5  can't print

    I can open the file in reader but it just won't print.  No error messages.   Print screen comes up and when I click print it does nothing.   Printer works for all other printing
    Message was edited by: coryd22

    Thanks for the reply.
    I changed the setting you suggested, did a restart of Reader, and ... still cannot print. Same error messages.

  • Help with reading information coming from a software into LabVIEW through Serial port

    Hi,
    I am new to LabVIEW and also an amateur in using RS232 for communication. I have this software that has these icons like speed increase/decrease, elevation up/down, start/stop. Now, when I click these buttons on the software, they perform the appropriate functions. For example, if I press start button, the signal must go through a serial COM port into LabVIEW to start the machine. How do I do that? How do I find what format the code word is when I press a button on the software? And how to decode the information to read whether the button pushed is start etc...? Any help would be appreciated.

    I may not be perfect, but I'm all I got!

    That information would be in the programming manual for the device you're controlling. Unless you have a device that has no documentation or you cannot get the documentation that's the first place you should look. If you cannot get the documentation at all then you've got some reverse-engineering to do. To do this you will either need a serial port sniffer (a hardware device), or you can try to use a software-based port capturing program. On Windows PortMon is the most prevalent. This will show you how the port was configured (baud rate, stop bits, etc). Warning: the information is technical.
    As far as how to get it running in LabVIEW, you should take a look at the serial port communication examples that ship with LabVIEW. The most problems occur in figuring out how to (a) terminate a write command, and (b) determining when to stop reading. For (a) this is typically done by appending a carriage return or linefeed to the command. This is device dependent. For (b) this is usually done by the byte stream ending with a character like a linefeed. Again, this is device-dependent. 
    You may also want to peruse this KB article: Serial Instrument Control Tutorial. There are also lots of tutorial on the internet for basic tutorials on serial port communication.

  • I need help with adobe iv reader.

    iam trying to pin a website using ie.it says the reader cannot read the website,i am not computer saavy so i donot know how to fix this issue, pls help,tyvm.

    i am trying to pin a website in internet explorer to my task bar,i get a 
    message that adobe v1 could not decode the website, i am not computer saavy
    so i  don't know what that means,plus this is a new computer 4 me.plus it
    worked fine  a few days ago. tyvm 4 ur help.
    regards,
    ray nist
    In a message dated 6/11/2013 9:27:11 P.M. Eastern Daylight Time, 
    [email protected] writes:
    Re: i  need help with adobe iv reader.
    created by Pat Willener (http://forums.adobe.com/people/pwillener)  in 
    Adobe Reader - View the full  discussion
    (http://forums.adobe.com/message/5400013#5400013)

  • Need help with how to call VB proceedure to open Adobe reader pdf file from differnt folders

    Using  MS access 9.0.2720  visual basic proceedure to call Adobe reader to open a specific flle from a folder on my c drive.
    useing the shell command , shellexecute is not available in the version I'm using.
    I can call the Reader with this code:   call shell "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"  and it will open reader, but
    I can't seem to get it to open a specific PDF file, I tried
    call shell "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" & "(folderpath)\.95.pdf"
    This use to work when I was running Xp and acrobat 5.0 , I am currentlt running windows 7
    thanks in advance..

    I am getting the exact error trying to down load bank statements but when I go to 'uncheck' the "Do not save encrypted page to disk" box it is ALREADY unchecked.  Can't get my bank statements down loaded.  Any other suggestions.  Need help quick.

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • Hi, I need help with my iphone four bought in England but I live in Italy, I upgraded IOS six and now I can not read more than the Italian card, how can I contact a service center via email?

    Hi, I need help with my iphone four bought in England but I live in Italy, I upgraded IOS six and now I can not read more than the Italian card, how can I contact a service center via email?

    Only the carrier it is locked to can authorize unlocking it. Sounds like the phone was hacked to unlock it originally. Find out what carrier it is locked to, and look up their contact information using google or the search engine of your choice.

Maybe you are looking for

  • IPod Touch 4G Stuck On Apple Logo Screen

    So I just recently jail broke my iPod touch 4G and was using iFile to delete some default apps and stuff that was taking up space on my device.  I only need to use the Music app, so all of the other default apps can be erased.  I must have accidental

  • My update failed and now my phone is frozen with the apple symbol

    I was updating my iPhone and it failed and now my phone is frozen with the Apple Icon.  It wont turn off or anything

  • License in Standard Edition with RAC

    Hi, I have to install: 2 nodes in RAC configuration with Standard Edition in active/passive configuration. License per CPU. Do I need license for both nodes? If not, is anywhere official note about this situation? There is no word about it in Oracle

  • Once again ora 12514

    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 22 22:28:13 2013 Copyright (c) 1982, 2005, Oracle.  All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mi

  • Can't update my ipad

    Can't update my iPad