Low Level Programming: Register Access

Hello all,
I am currently on a project in which I am developing an instrument to run on a Windows XP system and utilizing a PC/104 stack for data acquisition.  Most of the access to the cards on the stack is performed through drivers provided by the manufacturers of the cards.  However, some functionality appears to be missing from one of the drivers and I am now having to manipulate registers to configure things correctly.  To do this, I link to a dll that I have written and compiled in Microsoft Visual C++ 2010 Express in which I request access to that segment of memory.  Right now, all I am trying to do is read that segment, but currently Labview is throwing the error 1097.  The code in the dll is:
BYTE getCtrCfg(WORD address){
    BYTE *cfg_Out = (BYTE *)(address + 10);
    return *cfg_Out;
(BYTE is an unsigned char and WORD is an unsigned integer).  To me, this seems fairly straight forward - all I want is the contents of the 8-bits associated with the base address + 10 specified by the user - I am currently not trying to manipulate the data there.  This function compiles and executes with no errors in the console environments so it appears that there is some sort of clash between LV and the dll.  Does anybody have any suggestions?
Thanks, Matt
Matt Richardson
Certified LabVIEW Developer
MSR Consulting, LLC
Solved!
Go to Solution.

VISA would be a good idea, but if your vendor driver needs to access that device too, you are in a bit of a catch 22 situation, since Windows does not allow different kernel device drivers to claim the same device.
But one possibility might be a generic IO space kernel driver. The OpenG Port IO driver does provide a kernel driver for 32 bit Windows versions, that can access both IO ports as well as physical memory addresses. The actual LabVIEW interface library supports both IO port and physical memory access but the memory access is not really tested, but it is at least a start.
Modifications to the kernel driver would require installation of a Windows development toolchain including Windows SDK and DDK.
However this uses Windows kernel functionality that has been depreciated since at least Windows 2000, and therfore is most likely not available in 64 Bit Windows at all. So if porting to 64 bit is even a remotely possible requirement, then don't go that route. You would paint yourself into the corner in that way.
To download OpenG libraries including the OpenG Port IO driver you should install VIPM.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • "Low-level" authorizations for accessing BW reports - add users to role

    Using the advice in Topic "Low-level" authorizations for accessing BW reports, I have been able to publish a query to a role that has 3 test users and each user gets the same query but with different data, as determined in the tables.
    Is there a way to look up the users and e-mail addresses from a table and associate them to the role? We have several hundred e-mail recipients that will not need BW access, but only need an e-mail with a static report that contains data on their own territories.

    Hi!
    i think programatically it might be complex. You got to maintain a seperate variant of report per user and use this variant to send mail. that means you need to maintain a variant and a Broadcast setting per user. once maintained you can use it any number of times the values will be recalculated everytime.
    with regards
    ashwin
    <i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN.  you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>

  • Can java be a low level programming language??*

    can java be a low level programming language??
    can anyone answer this question and explain it why?
    please please please...�
    [email protected]

    strike one: you are asking an obvious homework type program without showing any evidence of having done any work of your own first. Please show your work first. This isn't a homework service.
    strike two: you are cross posting here and in the "new to java forum". This irritates many of us to no end as we end up doing volunteer work to solve a problem only to find that its already been solved in another thread. So we've wasted our time for nothing. Don't do this.

  • "Low-level" authorizations for accessing BW reports

    May I please have your attention for the following:
    Each employee is represented by a costcenter in our R/3, and thus, BW-system.
    Plan is as follows: by filling in the costcenter on the selection-screen of a BW-webreport on can see his/her own financial data for a certain (posting)period.
    Is there a way to restrict access without creating separate users/roles/profiles for each costcenter??(we have a lot of potential users who only need to see the report but do not need access to BW itself (RSA1 etc)).
    I'm thinking about some sort of mapping:
    e.g. user SANTA logs on -> ABAP-program/function maps it to correct costcenter e.g. 1234 -> user is only authorized for this costcenter...
    But is this possible and where to implement it??
    Thanx a lot in advance for your hints!!!
    Best regards,
    Marco

    Thanks al lot for your replies.
    Corwin, I tried your solution and I've almost got it working....
    1. made a table in DDIC to link username to costcenter
    2. set up a reporting auth. via RSSM
    3. created a variable (ZCOSTC) type 'Authorization' in the query designer
    4. wrote some code in the user-exit (via SMOD) to fill this variable (translate username to costcenter via mentioned table)
    5. created a role incl. authorization with reference to variable: value '$ZCOSTC'
    This reference is not working unfortunately enough.
    Everything works fine when I replace $ZCOSTC by an existing costcenter.
    Am I forgetting something??
    Thanx again!
    Best regards,
    Marco

  • Low Level Serial Port Access

    This question has gone unanswered several times on this forum in the past but I thought I would try it once more.
    Is there any Java API that is in, or will work with J2ME to allow direct read and write to the serial port similar to the functionality that javax.comm provides for j2se.
    This would be useful for a project where a palmos device is used to communicate with equipment used to monitor industrial processes.

    Some MIDP 1.0 devices support access to the Serial
    Port.
    I have done it with Motorola i85, i50 (iDen) and
    Motorola T720i.
    I think 95cl also supports it. I'm ALSO having problems with serial port access on
    my T-Mobile Moto T720i phone. I've had MUCH success
    with the Nextel i85, i50, i95cl, etc phones, but the
    same code isn't running on the T720i.
    What do I need to do differently???
    Thanks,
    -Tim

  • Ni 6602 Card, Configuration in Register Level Programming

    Hello,
    I want to do register level programming with the NI 6602 card .
    I want to use an x4 encoder reader and I want to use the continuous
    frequency generation.
    so i got the following tool to map the kernel space to the user space, so
    a simple shell script will do the job.
    http://www.linux.it/~rubini/software/phob/phob.html
    and than just using the provided function phob_io
    to programm the registers in a shell script:
    #!/bin/bash
    # shell script for init 6602 card with prf and encoder counter
    # set prf
    ../phob_io ''0:048=0000'' # Input Select Register
    ../phob_io ''0:00C=1109'' # Command Register
    ../phob_io ''0:038=00ffffff'' # Load A Register
    ../phob_io ''0:03C=00ffffff'' # Load B Register
    ../phob_io ''0:
    034=9218'' # Mode Register
    But don"t get any output as i expect, what is wrong?
    Do i have to set some othe registers, or write somthing to the PCI-Config?
    Does anyone has some sample configuration?
    Thanks
    Mario Behn
    Mario Behn
    Microwave Remote Sensing Laboratory Room 104
    University of Massachusetts
    Knowles Engineering Building
    Amherst, MA 01003-4410
    phone (413) 545-4675
    fax (413) 545-4652
    email [email protected]

    A typical project for one of the 660x RLP examples needs to include the following source code files:
    ../OSinterface/osiBus.cpp - generic register I/O interface used by the example code
    ../OSinterface/Linux/osiUserCode.cpp - OS specific adapter used by osiBus to access registers on the hardware in the specific OS
    ../ChipObjects/tTIO.cpp - abstraction of the chips and registers on the hardware into C++ classes and properties
    and one of the examples files, e.g.
    ../Examples/gpct_ex1.cpp - implementation of a specific operation, including all initialization of the hardware
    (The same is true for the examples for other boards although the names of the ChipObject and examples will be different.)
    Each of these files needs to be compiled to give y
    ou object files, and then all of the object files need to be linked together to build an application (executable binary). The errors you list seem to indicate that you are not using all of these files.
    There is more information on the RLP example architecture in the attached PDF document.
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
    Attachments:
    Register_Level_Programming_Architecture.pdf ‏165 KB

  • 660x DIO Register Level Programming

    I am working on a comedi/linux driver for the 6602, and can't figure out how to access the other 24 DIO lines (the ones shared with counter/timer).
    Firstly, I want to use the DIO lines for output, so I must configure them as such. The RLPM doesn't say anything more than a hint about how to configure these lines .
    It seems the answer lies in using 2 bits to set to IO_Config Register(s). The RLPM says that these registers contain 2 bits for configuration direction, but only lists functionality for 00 and 01; not 10 or 11. Is it possible that setting 11 or 10 sets these PFI lines for DIO?

    Hello!
    We don't do support on register-level programming but the problem you are experiencing might be due to tri-state on the ports?
    Please check this manual that covers register programming of the device you are using:
    http://digital.ni.com/manuals.nsf/websearch/47300C3471742AD0862570AE005E0AD1
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Register level programming of interrupts for PCI 6503

    Hi all,
    I'm basically trying to get an interrupt from the card upon a change in the data of one of the ports (for instance port A) so I can catch pulse signals without having to poll the pins manually at a high rate. I can't figure out from the documentation and examples whether this is actually possible using register level programming (can't use the DAQmX libraries because I use InTime OS). I can set the appropriate bits of the Interrupt Registers in order to enable the two interrupts (A and B), but I'm not sure what condition generates these interrupts.
    Additionally, I want to be able to send out a pulse on a pin and have it automatically cleared by the board.
    As far as I can tell both of my requirements mean using the card in strobed mode, but the code examples don't give enough information how to work in this mode. Do i have to use the handshaking mechanism somehow and if so, how is this better for me over using static i/o and manually checking pin values?
    Any help or referrence would be greatly appreciated.
    Thank you in advance
    Orr

    Hi Orr,
    The best source of information for this device is its user manual [1], and Appendix B discusses the register map and programming considerations.
    Speaking specifically to interrupts, please refer to PDF page 43 (B-2), emphasis mine:
    Two software-controlled registers determine which devices, if any, generate interrupts. Each of the 82C55A devices has two interrupt lines, PC3 and PC0, connected to the interrupt circuitry. On the PCI-DIO-96 and PXI-6508, the 82C53 device has two of its three counter outputs connected to the interrupt circuitry. Any of these 10 signals can interrupt the computer if the interrupt circuitry is enabled and the corresponding enable bit is set. Refer to the Programming Considerations for the 82C53 section for more information. Normally, the handshaking circuitry controls PC3 and PC0 of the 82C55A devices; however, you can configure either of these two lines for input and then use them as external interrupts. An interrupt occurs on the signal line low-to-high transition."
    The pages following that section describe the interrupt control registers and give pseudo-code examples for configuring them.
    Once we clear this obstacle, let's move on to your output questions.
    [1] PCI-DIO-96/PXI-6508/PCI-6503 User Manual
    http://digital.ni.com/manuals.nsf/websearch/6E8329494F3955528625758300678D55
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • Register Level programming of the AT-DIO-32HS

    I am working with a piece of software that was written using the AT-DIO-32F card. The original programmer did NOT use the National Instruments driver with that card, but rather used a software library that allowed him to access and manipulate the registers directly on that board. The name of the library is called NTPORT (http://www.zealsoft.com/ntport/index.html).  He did this because he was not able to meet the timing requirements using the NI driver.
    We have to replace the AT-DIO-32F card with the AT-DIO-32HS card, and I would like to know if I can continue to do register level programming with the 32HS card.  I have found that I also can not meet my timing requirements using the driver that comes along with the 32HS card.
    I checked this web page (http://digital.ni.com/public.nsf/allkb/B08F4125A9325B3F862565CC0073E68F?OpenDocument), and did not find the AT-DIO-32HS listed. Does this mean I can not program its' registers ?
    Any feedback would be appreciated !!
    Thanks !!

    Hi Raminta-
    The Measurement Hardware Driver Development Kit (MHDDK) provides examples and register documentation for the 653x devices (which includes the AT-DIO-32HS).  The DIO-32F and DIO-32HS devices are quite similar, so it is possible that your existing code will work.  The resources on the MHDDK page should help you fill in any differences.
    Thanks-
    Tom W
    National Instruments

  • How to disable Wifi and Network access in low level setting for security ?

    Hi
    New to here
    One of our final customer bought imac last months. OS 10.9, SN is c02*******J4i
    Since they are security printing, all the necessary ports accessing to outisdes need to be disabled in low level setting(not the ons just like turn on and off ).
    The ports including USB storage, Network and WIFI.
    I googled and found the following
    Open the /System/Library/Extensions folder.
    To remove support for USB mass storage devices, drag the following file to the Trash: IOUSBMassStorageClass.kext
    Open Terminal and enter the following command: $ sudo touch /System/Library/Extensions The touch command changes the modified date of the /System/Library/Extensions folder. When the folder has a new modified date, the Extension cache files (located in /System/Library/) are deleted and rebuilt by Mac OS X.
    Choose Finder > Secure Empty Trash to delete the file.
    Restart the system.
    I want to confirm this before sending to final user. Since I didn't have mac on hand, just wonder whether there are similar kext files for network and wifi to remove.
    Just like step 2 described.
    I would like customer to backup these files before permanently removed.
    Many thanks
    Kevin
    <Edited By Host>

    chiqui wrote:
    Is it possible to disable Internet access point and WAP as when I use WiFi some connections to WAP server of my provider are still made and I get charged. I am looking for the option not to delete it entirely from the access point list, but rather disable it as I might need connection when WiFi is not available and I want to be able to enable it as once I delete the server name and setting I won't know it.
    Is it possible to do it and how?
    You could delete WAP accesspoint. Not all providers (carriers) allow this.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How can I get low level access to netstream using OSMF?

    Hi
    I'm trying to gain access to the low level netstream underneath the hood of OSMF so that I can access its netstream.info property for reading metrics.
    I find that I am able to do this for MP4 videos but not for F4M dynamic streaming videos.
    For MP4, I was successfully able to create a VideoElement that used a CustomNetLoader class which overrided the createNetStream method to return a netstream object.
    However, for F4M, I have to use either the MediaFactory.createMediaElement(element) method or the F4MElement. The F4MElement does not allow a CustomNetLoader to be used and it seems to only accept a F4MLoader class.
    Any advice on how I can access either the netstream object or the metrics of F4M videos?
    Thanks

    ok, I finally got access to the direct netstream object - someone from Akamai gave me the answer.
    Seeing how I wasn't able to find this answer anywhere on Google, I'm going to post the solution here as there's no way I would have known this solution without someone who knew how to get direct access to the netsteam object in OSMF.
    There's a hidden class that won't show up in the code hint called org.osmf.net.NetStreamLoadTrait that you have to import.
    1) First, your media player playing controlling your MediaElement has to listen for a LoadEvent.LOAD_STATE_CHANGE event after you load the MediaElement into the media player
    mediaPlayer.addEventListener(LoadEvent.LOAD_STATE_CHANGE, onLoadStateChange);
    2) Upon LoadEvent.LOAD_STATE_CHANGE, check for a org.osmf.traits.LoadState.READY - you can only access the NetStream object when it is LoadState.READY or the netstream object will return as null.
    private function onLoadStateChange(e:LoadEvent)
                                  if(e.loadState == LoadState.READY)
    3) Once the LoadState.READY is true, you can create a datatype of NetStreamLoadTrait and type cast it from a Load trait:
    private function onLoadStateChange(e:LoadEvent)
      if(e.loadState == LoadState.READY)
         var nsLoadTrait:NetStreamLoadTrait = mediaPlayer.media.getTrait(MediaTraitType.LOAD) as NetStreamLoadTrait;
    4) Once you successfully type cast the Media Load Trait from your media into NetStreamLoadTrait, you can access the property netstream from the NetStreamLoadTrait object.
    private function onLoadStateChange(e:LoadEvent)
      if(e.loadState == LoadState.READY)
         var nsLoadTrait:NetStreamLoadTrait = mediaPlayer.media.getTrait(MediaTraitType.LOAD) as NetStreamLoadTrait;
         var ns:NetStream = nsLoadTrait.netStream;
    Hope this helps someone out there.

  • High performance (low level) jdbc access routines

    Does anyone know of any low level jdbc access routines?
    My need is to be able to do high speed data access. I'm looking for something 2 orders of magnitude faster than what is available with the typical use of java.sql (connection, preparedstatement, resultset and so on).
    Several years ago while using visual basic and odbc, I had to use direct calls to the odbc32.dll functions for data access to get the performance I wanted rather than the ado and rdo stuff. I am wondering what is available with jdbc - perhaps the routines that are used when writing jdbc drivers themselves. I don't know if there is an equivalent "gateway" that all jdbc drivers use (like the odbc32.dll that is used with all odbc drivers in windows)
    Any comments would be appreciated. Even just hints as to where I might find this kind of information.

    Does anyone know of any low level jdbc access routines? What are you expecting besides what is provided in the java.sql interfaces?
    The JDBC spec spells out what the interfaces are. There isn't anything else to call.
    >
    My need is to be able to do high speed data access.
    I'm looking for something 2 orders of magnitude
    faster than what is available with the typical use
    of java.sql (connection, preparedstatement, resultset
    and so on).Faster than what driver talking to what database over what network?
    Several years ago while using visual basic and odbc,
    I had to use direct calls to the odbc32.dll functions
    for data access to get the performance I wanted
    rather than the ado and rdo stuff. I am wondering
    what is available with jdbc - perhaps the routines
    that are used when writing jdbc drivers themselves.You'll have to write your own driver.
    I don't know if there is an equivalent "gateway"
    " that all jdbc drivers use (like the odbc32.dll that
    is used with all odbc drivers in windows)Since Java's platform-independent, there's no easy out like taking advantage of OS calls.
    Any comments would be appreciated. Even just hints
    as to where I might find this kind of information.Sounds to me like you want to write your own driver, and when you're done it will only be good for one database and operating system.
    I'd have to ask what made you so certain that database calls were the bottleneck in your app. For the typical Web app, a reasonably well written persistence layer will be fast enough. There's other network latency in the system, and UI response can be slow enough to keep up. Are you worried about high throughput to the database for a Web app? If so, you might be guilty of premature optimization.
    Unless I was absolutely certain that the JDBC driver from my database vendor would not do the job, I'd write the app and then profile it to find out where the performance bottlenecks were. I wouldn't take this extreme step until I was certain that the driver was the problem and a custom version would fix it.
    %

  • How can I communicate PXI-6509 by Static DIO Register-Level Programming?

    - How can I communicate PXI-6509 by Static DIO Register-Level Programming?
      PXI-6509 physically Port0 is connected to Port1.
      For checking all connections are correct for this case so I have used DAQmx Test Panel. Just in case everything is ok.
      In this case I interested in to communicate the PXI6509 by Register-Level Programming.  
      I have tried to use Open VISA Test Panel for sending and reading data (in MAX explorer) and
      use NI-Spy for checking communication data.
      The first step I configured Port0 to Outputs state and Port1 to Inputs state.
      The second step I setup Port0 to 0xAA.
      The third step I read back Port1 and expected data will be 0xAA but just only 0x0. Why???
       1              ViOut8(0x03D83318, 10, 0x00000041, 1)

    Hello!
    We don't do support on register-level programming but the problem you are experiencing might be due to tri-state on the ports?
    Please check this manual that covers register programming of the device you are using:
    http://digital.ni.com/manuals.nsf/websearch/47300C3471742AD0862570AE005E0AD1
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Where is the SCXI-1102 Register-Level Programming Manual

    The SCXI-1102 User Manual refers (in Chapter 5) to a "SCXI-1102 Register-Level Programming Manual". I can't find the register-level programming manual on www.ni.com. Where can I obtain this manual?

    Hey Don,
    Thank you for contacting National Instruments.
    There is not a register-level programming manual for the SCXI-1102. This was a mistake made in the first version January 1996 of the SCXI-1102 manual. This was corrected in the later August of 1997 version.
    http://www.ni.com/pdf/manuals/320975b.pdf
    Register-level programming is not formally supported by National Instruments. If you would like more information about alternative methods of programming other than NI-DAQ please contact your sales representative.
    Best Regards,
    Joshua P.
    Application Engineering
    National Instruments

  • Pci-6703 Register-Level Programming

    We wanna use the analog output channels of the 6703 and configure for DC Voltage for my application without NI-DAQ function.
    I have searched in NI website. but there is no PDF file or document file about register-level programming.
    It's important for us, we must program drivers and functions byself.
    How can I do?
    Thanks

    I believe that the Measurement Hardware DDK provides documentation, examples, and register objects for the NI 67xx series of devices.
    geoff
    Geoffrey Schmit
    Fermi National Accelerator Laborary

Maybe you are looking for