Unable to read/write bytes using 9870 with cRio 9151

Hi everyone,
I'm currently having some problems trying to use 2 ports of module NI 9870. I'm unable to read bytes even if I try to send some datas (I always get a Timeout) and I'm also unable to write some datas( I can't see nothing on Hyperterminal).
Please find enclosed a snapshot of my Fpga code.
Regard,
Nicolas Kaminski, Toulouse France
Attachments:
ReadBytes.jpg ‏93 KB
WriteBytes.jpg ‏30 KB

Hello,
Can you give us some other details:
Are you sure that you provide power to the 9870 module?
Do you have tested your system with an example? (NI-987x Serial Loopback.lvproj)
DO you get something through that loopback?
Regards,
Mathieu P. | Certified LabVIEW Associate Developer
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
Journées techniques : des fondamentaux aux dernières technologies pour la mesure et le contrôle/comm...

Similar Messages

  • Asynchronous read & write by using Asynchronous api provided in nio-java 7

    HI,
    I am trying to write a small program to implement **asynchronous read & write by using Asynchronous api provided in nio in java 1.7** in windows machine.
    i tried the following code to write a small string to a file asynchronously.file is getting created but the contents are not dispalying.
         static long startTime = System.currentTimeMillis();
         static long endTime;
         static long execTime;
         public static void main(String[] args) {
              String path = "C:\\AsynchWrite.txt";
              Path file = Paths.get(path);
              final AsynchronousFileChannel channel;
              long pos = 1;
              try {
                   OpenOption[] options = { StandardOpenOption.CREATE,
                             StandardOpenOption.WRITE, StandardOpenOption.SYNC };
                   channel = AsynchronousFileChannel.open(file, options);
                   ByteBuffer buffer = ByteBuffer.allocate(1000);
                   String writeThis = "Testing by writing a line";
                   byte[] src = writeThis.getBytes();
                   buffer.put(src);
                   channel.write(buffer, pos, null,
                             new CompletionHandler<Integer, Object>() {
                                  @Override
                                  public void completed(Integer result, Object attachment) {
                                       System.out.println("completed successfully");
                                       System.out.println("start time :" + startTime);
                                       endTime = System.currentTimeMillis();
                                       System.out.println("end time : " + endTime);
                                       execTime = endTime - startTime;
                                       System.out.println("Execution Time :" + execTime);
                                       System.out.println("Execution Time(ms) :"
                                                 + execTime);
                                       try {
                                            channel.force(true);
                                            channel.close();
                                       } catch (IOException e) {
                                            // TODO Auto-generated catch block
                                            e.printStackTrace();
                                  @Override
                                  public void failed(Throwable exc, Object attachment) {
                                       // TODO Auto-generated method stub
                                       System.out.println("failed!!");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }Please help me out
    Thanks in advance,
    Ravi

    It looks like you are missing buffer.flip() after your put as otherwise the buffer position will be at 25 (not 0 as you expect).

  • Unable to read 5th channel using cDAQ 9178 with NI 9219 modules

    Dear LabView user,
    I've made a VI for reading the measurements of a couple of LVDT sensors, a load cell and a couple of strain gauges. When I connect 4 of these sensors to my cDAQ 9178 with using 1 slot of NI 9219, then there is no problem for my VI. But if I use 2 modules, and connect the 2 LVDT sensors and the load cell to the first module, and the 2 strain gauges to the 2nd module, then my program only will show the readings of the first module and the readings of only 1 strain gauge on the 2nd module. I've found that there occurs an error for the 5th channel in the 'zero' state. It says my buffer size is too small... How can I solve this problem? I can't work with finite samples because it is a continious measurement. 
    I also have the cDAQ 9171 USB module, if I only connect 4 sensors to this module, the sample rate is high (100 Samples/sec), when I use the same configuration, but connect this with the cDAQ 9178, the sample rate is much lower however I use the same NI 9219 module to fill the slots. Is there some kind of setting I need to make when switching over to the cDAQ 9178?
    I've attached my VI.
    With kind regards,
    Pete

    Dear RavensFan, 
    Thank you for your answer.
    "Have you tried swapping the modules between the slots and see if you still have the same problem or if it moves?"  When I use the cDAQ 9178, I always use the first 2 slots next to the power suply and the usb connection, you mean that I should try for example the 4th and the 5th slot or other slots? I will try this on Monday, and I will let you know.
    About the states machines inside a state: How is it possible then to use several buttons, like start and stop measurement and the 'home' button inside the state "measurement"? Should I make another simple state machine inside this state? 
    What about that 5th channel that I'm unable to read? The problem happens in my "zero" state: to acquire my "zero elements", the loop does the job for the 5 channels for the first 8 samples, after that, it doesn't want to sample the 5 channels anymore, it only does for 4 channels... It's something about the buffer size, but I don't know how to fix that.
    With kind regards,
    Peter

  • Maxl script unable to read/write to a folder

    When logged in to EAS, we are trying to run a maxl script to read/write to a report script in a particualr folder on the server. Even though the eas login username has write permissions to that folder, the maxl keeps saying: unable to open file.
    Is there any internal Hyperion service account that should specifically have write permissions to the folder?
    here is the maxl:
    SPOOL ON TO 'D:\Oracle\WE.log;
    LOGIN 'username' 'password' on 'server1';
    ALTER SYSTEM LOAD APPLICATION 'Plan1';
    ALTER APPLICATION 'Plan1' LOAD DATABASE 'Main';
    export database Plan1.Main using report_file 'D:\Oracle\WE.rep' to data_file 'D:\Oracle\WE.rpt';
    SPOOL ON TO 'D:\Oracle\REV.log';
    When we run it, we get the following error:
    It gets past the alter systen and alter application commands, and then:
    'Unable to open file ['D:\Oracle\WE.rpt']

    Have you tried running it from a maxl session and not EAS, if you are testing using maxl you may need double backslashes instead of single ones.
    Have you tried with the report script in the database app folder and using the server option - export database Plan1.Main using server report_file 'WE' to data_file 'D:\Oracle\WE.rpt';
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Unable to read/write CDs/DVDs

    I have a Sony DVD RW DW-U10A combo drive. I have been unable to write CDs for a few weeks now, but manage with my MacBook. Now however, the drive in the iMac doesn't see either blank or written CDs, or professionally produced CDs. This also applies to all DVDs.
    The only, but major, change that I have made is to upgrade to Tiger. I cannot categorically link the problem with the upgrade.
    Could this be the cause of the problem? What can I do to be able to read/write CDs while using Tiger?
    How can I clean the CD lense if that is also contributing to the problem?
    Thanks in advance
    PG

    Hello and Welcome to Apple Discussions. 
    You really need to repost over in the MacBook forums. The hardware is very different.
    http://discussions.apple.com/forum.jspa?forumID=1172
    regards
    mrtotes

  • Unable to read the file using UTL_FILE Dir

    I need to read/write a file from/to the operating system through PLSQL Package. I used UTL_FILE package to do the same. In the application server the utl_file_dir(/usr/tmp in my system) is created as a softlink to database server.
    oI want to run this package through the application server. However I am unable to read and write the file to the operating system.
    I just wondering it is not reading/opening the file from the server. Please suggest me how to modify my code.

    Hi,
    How to check if it is end of file or not? I have the following function which is working fine in my win2003 server std 32bit and Oracle10g Database R2 Standard Edition one 32bit. HOwever, when I deploy to production server which is 64bit OS and database, it gives error at UTL_FILE.GET_LINE(fptr, tmp);
    Any idea why it behaves like that?
         FUNCTION readFile (
              inHTML OUT CLOB,
              path IN VARCHAR2,
              htmlFile IN VARCHAR2
         ) RETURN BOOLEAN IS
         fptr utl_file.file_type;
         tmp VARCHAR2(5023);
         bufferlen BINARY_INTEGER;
         BEGIN
              fptr := UTL_FILE.FOPEN(path, htmlFile, 'r');
              DBMS_LOB.CREATETEMPORARY(inHTML, TRUE);
              DBMS_LOB.OPEN(inHTML, DBMS_LOB.LOB_READWRITE);
              LOOP
                   UTL_FILE.GET_LINE(fptr, tmp);
                   if tmp is not null then
                        tmp := tmp || CHR(10);
                        bufferlen := LENGTH(tmp);
                        DBMS_LOB.WRITEAPPEND(inHTML, bufferlen, tmp);
                   end if;
              END LOOP;
              WHEN NO_DATA_FOUND THEN
              DBMS_LOB.CLOSE(inHTML);
                   UTL_FILE.FCLOSE(fptr);
                   RETURN TRUE;
              WHEN OTHERS THEN
                   DBMS_LOB.CLOSE(inHTML);
                   DBMS_LOB.FREETEMPORARY(inHTML);
                   RETURN FALSE;
         END readFile;

  • To read 512 bytes using serial communication

    I want to read 512 bytes of data using rs 232 with the timeout of 30ms. I am using "Serial read with timeout -Palm.vi". Is there a limitation of the number of bytes I can specify to this VI?
    Thanks!!
    Attachments:
    Serial_Read_with_Timeout--Palm.vi ‏63 KB

    Hi software enigineer,
    It is not possible to transfer 512 bytes per 30 ms here. To do this would require a baud rate of 136533 (512*8/.03) and the maximum possible baud rate is 115000. The recommend baud rate for a serial transfer is 9600, which would mean transferring at most 36 bytes if the timeout is kept at 30ms. Moreover, there is usually some overhead involved in serial communication, and I would recommend sending a little less than the maximum 36 bytes every time too.
    On another note, I noticed that in your block diagram, you are using the Bytes at Serial Port vi. Definitely use the output of this vi to determine how many bytes to read at a time and read the bytes as they become available in the serial buffer rather than reading in a large buffer
    all at once. Continuously read and append the output until there are no more bytes to be read or until the termination character is read. This will avoid any lost data transmission due to overflow.
    Good luck with your program!
    Kileen Cheng
    Applications Engineer
    National Instruments

  • Unable to read/write to external FW drive

    I have a LaCie external D2 drive and just noticed since I got a new MacBook Pro that I'm getting read/write error -36 when attempting to copy files to/from the disk.
    The actual finding of the problem was on reinstalling and configuring Silverkeeper for backups. I've had problems with Silverkeeper in the past but was giving it one last chance before moving to Retrospect. When it failed I started to config Retrospect and when I set it to discover connected drives it didn't see the external harddrive but did see the internal & external DVD/CD burners. The external DVD/CD burner is also LaCie and was first in the firewire chain but even disconnecting it and connecting the external drive has no effect. So when neither backup program worked I tried an individual file copy from the internal to external drive and received the "error -36"
    Do I need to format the drive to work with the MacPro or is this a permissions problem?
    K.

    Has the drive ever been formatted? If not, then yes
    you need to format the drive before you can use it.
    Otherwise check with LaCie's technical support.
    Yes, the drive has been formatted and was used with my old Powerbook for backup purposes. I forgot to mention that the drive does appear on the desktop when I boot up etc and I can open the Finder window on it and navigate the folders etc located on the drive. Just no read/write

  • Unable to read values populated using Java Script

    hi Experts,
    we generated a BSP Page through some SPRO setting it contains HTML and ABAP scripts.
    in that we have 2 select - option - dropdowns. i first one is being populated by ABAP script. second one is being populated by java script.
    the BSP page is working fine. but i am unable to read the second dropdown value using a class method
    we call this class method in the BADI : CRM_SERVICE_WEBREQ. method : FORM_ON_EVENT
      CALL METHOD cl_uxs_xml_services=>get_value_via_xpath
      EXPORTING
        ir_node                   = ir_form_data
        id_xpath                  = 'secondChoice'
         id_xpath_namespace_uri    =
         id_xpath_namespace_prefix =
         id_multi_namespace        =
      RECEIVING
        rd_value                  = lv_value
      EXCEPTIONS
        not_found                 = 1
        not_unique                = 2
        OTHERS                    = 3
    but i am able to read other fields in the page. i am not sure but i changed the id and name on the second drop down.
    pls let me know how to read the value for second drop down.

    Hi Ben Grice,
    ASP.NET questions should be post in
    ASP.NET forums. You can get better help there.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I am unable to read pdf files using Acrobat Reader on my MAC OS X. Any suggestions?

    How do I read pdf files using my MAC OS X?

    You can read pdf files with preview. Select a pdf document, right click on it, and choose Preview. You can also get info and select to choose Preview for all.
    You can also install Adobe Reader 10.1.3 for Lion. It will also install a plug-in to read pdf docs in the browser.
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5360

  • Why I am unable to read/write thermocouple data using FIFO

    I like get data using 9213 module. I used example VI for this. And to get the data according to my desired samling rate, I used FIFO.
    The problem is, if I use FIFO, I do not get any data when run the real time VI.
    But, if I like to get data using cluster, then it is OK.
    Also, can you tell me why the error comes when I use FIFO and run the program?
    My sampling desired rate is 1200 sample/sec. I like to acquire data for 30 seconds after the trigger.
    Attachments:
    Error_50400.jpg ‏34 KB
    FPGA.jpg ‏201 KB
    realtime_temp.jpg ‏249 KB

    Good Afternoon,
    I would suggest lowering the number of elements into the invoke node in your real time VI.  You only need the number fo samples times the sampling rate for the number of elements input.  Hope this helps!
    -Cody C

  • Oops. Can I read my byte stream files with missing headers?

    My fault, I know, but I wrote out an 1D array of numbers to a file using the simple Write File vi, not realising that a header would have been a good idea at the time. Now I can't read them back in because LabVIEW doesn't know what they are, and trying to put the original array element (Dbl Precision Number) on the Byte Stream Type of Read File doesn't work.
    So, is there any way that I can insert an appropriate header back into the beginning of the file so that I can then read them in successfully?
    (No, unfortunately I can't regenerate the data. Believe me, I would if I could!)
    Thanks,
    Riggy

    I suppose you used the Write File function from the File I/O pallette since there is no Write File VI?
    If that is the case your file should be exactly 8*N bytes long, if the array had N elements of type DBL.
    You can simply read back you data with the 'Read characters from File' VI (from the File I/O pallette) and then typecast the read string to a 1D array of DBL. (typecast is the first icon in the 'Advanced--Data Manipulation' pallette.
    -Franz

  • Options for read/write form field data with VBA/Reader

    I have a project which requires reading and writing field data to a PDF form using VBA in PowerPoint. The code I have works properly with the full version of Acrobat, but the client this project is for will be using Reader. I'm looking for suggestions to what options I have to be able to access the form field data (I don't need any other features other than access to the field data). Ideally, I would love a solution which doesn't require the client to install anything extra for this to work, but I'm assuming that this isn't possible without an extra install.
    Is there a library that exists in Reader (or could be licensed to be installed on the client's machine) that would allow the data to be read without needing the full version of Acrobat?
    Does a plug-in exist for Reader, or could be written, that would allow this? Writing a plug-in would certainly be beyond my current capabilities, but I am interested in knowing every and any choices that are available.
    Are there any other options to do what I need to do?
    I had originally thought about exporting the form data and parsing it in the VBA program, but this would take a bit more work to write the parsing routine instead of accessing the fields directly. Plus, it appears to me that Exporting is not enabled in Reader.
    Thanks for any insight you may be able to provide.

    Thanks for the response; this was my original suggestion, but I don't think this is feasable for our client. I suggested to our account people that this might be the only way to do this (and the easiest, although possibly the costliest since it would have to be purchased for their entire sales force) and they initially said that this would not be an option, so I wanted to be able to cover all the bases, and explore any other ways that they could do what they want. Is this the absolute only option to do this?
    Someone also suggested to me that licensing the Acrobat PDF Library SDK might be a way to do this, or that it could possibly be done with a plug-in for Reader (although from what I have found, Reader plug-ins would have to be approved by Adobe). These options, if possible, are beyond my current knowledge but I do want to be able to give them a complete list of possibilities.
    Thanks again.

  • Unable to read/write Windows files on mac anymore

    Today, out of much extreme panick as of a false alarm, i had installed MacFUSE, an application used so you can read and write windows files on your mac side. What i didn't know is that i already had NTFS-3G, one which could already do that. I uninstalled MacFUSE instantly (removed pane from system preferences), now i still can't see windows mounted on my mac desktop. When i boot up, i get an error; below. If i choose to manually mount it from the disk utility i get the same error. I'm not sure where to post this type of stuff since it's not really apple related but it's worth a shot.

    I've had that same issue with NTFS-3G and Fuse. I ended up getting Paragon NTFS for Mac. Its about 20 bucks, but it works great. IMHO, this is a feature Apple should build into OS X especially since they have a feature such as Boot Camp

  • I have a MacBook Air with Snow Leopard. I can read/write in both directions with 16 GB Fat32 drives but cannot with a 250GB NTFS drive.

    I have a MacBook Air. I also have a 250GB NTFS external drive which the Mac sees. i can copy and paste from the external drive to the Mac but not from the Mac to the external drive. However, I can go in both directions with a Fat32 16 GB flashdrive. Can anyone explain this to me?

    I've always recommented ext3 filesystem if you wanna use an external drive for both Windows and Mac OS as both can read and write to that filesystem.
    But obviously you'd have to format the drive (you can use Mac disk utility)

Maybe you are looking for

  • Rollover buttons in Forms 9i

    I have read that forms 9i has a built in rollver button capability such as seen in all web menu buttons where there is a series of bitmaps that differ for a mouse rollover, mouseup, mouse down, and hit. Is this true and if so how do I utilize this ca

  • A bug in MergedDictionaries and ThemeDictionaries.

    Hi everyone. I found a bug when developing in .NET for WinRT with XAML. To reproduce the bug, follow these steps: (1) Create an empty Windows Store app with XAML, call it "ReproduceDictIssue". (2) Place the following AppBarButton on the main page so

  • Help with Touch photo and movie copy/paste issues

    I recently moved all of my photos and movies from my Touch to a USB drive, and now I want to put them back but the Touch won't let me - how do I replace them??  My ultimate destination for the files is the Cloud, which I've just loaded.

  • Activate Profit center in service orders header section additonal data tab

    Hi, I want to activate or display Profit Center (PRCTR) in additonal data tab in header section of service order IW31/IW32. Can you guide me how to achive this through config or alternative way? Thanks in Advance, Dolly

  • Hi can u please help me out to display multiple [b]thumbnail images[/b]

    hi, hi, please help me out! please help me out!! I need to display multiple thumbnail images on the jframe or on a jpanel . From the database where the path of the images are stored say i should first get thumbnail of the images and then display any