For Experts: Why does LabView cause System reboot while accessing hardware with driver?

Hello NI Developers!
I use LabView 7.1 under Windows XP
I have a programm console application which accesses through Jungo Windriver PCI-E board.
This program works fine - and performs DMA data transfer between PC and Board's memory.
In order to implement this console application work together with LabView I did following:
1) Added this function inside the source:
 _declspec(dllexport) void LVMainFunction(uInt32 *IntValue);
_declspec(dllexport) void LVMainFunction(uInt32 *IntValue)
    AllocConsole();                   //Open new console window
    SetConsoleTitle(L"Debug Window"); //Set a title for console window
    freopen("CONOUT$","a+",stdout); //redirec standard output stream to current window so
                                    // so we are able to see "printf" outputs
   freopen("CONIN$","a+",stdin);    //redirec standard input stream to current window so
                                    // so we are able pass inputs from keyboard
   main();                          //Call applications main function which does all the work
2) Compiled this new source as DLL library
3) Call  LVMainFunction(...) function from LabView using Call Library Node
In the result: Executing VI - opens new console window, shows debug outputs and receives keyboard inputs.
It works fine till the last function, which perform DMA data transfer - and reboots PC.
1) Why does this happen?
2) I understand that opening console from Call Library Node, attaches together this console window and running VI. So If I close one of them - both windows closes.
     So does LabView have somekind of restrictions of accessing Hardware's functions? 
I can read Board's resource information and view size of memory on board, interrupt functions and other information about device, but when I try to reach
DMA my system reboots. And I understand that this should be some kind of LabView problem, cause I tried different implementations, even without use of
console window - and the result is the same.
3) Should I split the program in to two separate processes and perform data exchange using Sockets or Pipes techology?
Thank you in advance!
ACiDUser
Message Edited by ACiDuser on 11-13-2008 09:37 AM

Hello!
At LAST!!!
I solved this problem!
From the beginning I was following National Instruments manual on how to build DLL with external IDE:
  http://zone.ni.com/reference/en-XX/help/371361A-01​/lvhowto/building_library_project/
Set the Struct member alignment control to 1 Byte.
Now this option caused my PC to reboot!
So could someone explain  why this happened? and If it is a bad tip, so it's better to remove from manual. Then other people will not have such problems as I did
- wasting 2 monthes of time determining the problem. 
I changed it to  Set the Struct member alignment control to DEFAULT.
and now everything works fine.
Regards
Message Edited by ACiDuser on 11-13-2008 11:14 AM

Similar Messages

  • Why does LabVIEW allow me to have 2 controls with same name

    Here's a general LabVIEW question:
    Why does LabVIEW allow me to have 2 controls with the same name in the same VI?  It seems like this only increases the chances of confusion.  Especially when someone is just looking at a block diagram (or documentation of a block diagram).
    No other programming language that I know of allows this.  I realize that uniqueness of name is not as critical in LabVIEW as it is in any text based language.  For example, in a text based language, if I had 2 variables called abc and I wrote a statement
    abc = 12;
    the compiler would not know which abc was being referred to.  In LabVIEW, if we had 2 controls called abc, the equivalent of doing an abc=12 is writing to a local variable (which is always linked to one of the controls) and there is no ambiguity.  Still, someone looking at the code cannot figure out which abc is linked to unless he does a right click>>Find>>terminal (or a double click).
    Even though I have never and never will name 2 controls the same, I think it would be a nice constraint to see enforced by LabVIEW.
    Any input from NI engineers on this?
    Message Edited by S G on 12-18-2007 03:38 PM
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
    Attachments:
    Trial1.JPG ‏21 KB

    I know when you copy and paste a control or indicator, LabVIEW automatically increments the label. But since you can hide the label, and show or hide the caption, there must be another mechanism that LabVIEW uses to keep track of all the controls. I thought I remember back in the "old days" (ver 6 or 6i) LabVIEW would give you an error if you tried to make two controls with the same name. Perhaps that was LabWindows/CVI.
    I don't know where the index is actually stored, but if you look at a property node linked to the Pane, you will see an array of references to the controls and indicators. Since the references are stored in an array, I assume that any local variables are tied to the index of that array. Since the labels themselves are properties of the control, I guess there's no reason to limit what that label is. They all have a unique index number.
    Interestingly, this array of references grows from the beginning. That is, any new control or indicator is put at index 0, not the end of the array.
    B-)
    Message Edited by LabViewGuruWannabe on 12-18-2007 08:45 PM
    Attachments:
    Labels.png ‏12 KB

  • Why does VersaMail cause system reset after HotSync?

    On a clean factory default setup Treo 650, I can set up one account -- my SprintPCS account -- on VersaMail and successfully use VersaMail to download and send emails. After a HotSync with my Outlook Calendar, Contacts, Memos and Tasks, I see the following errors in my sync log. Then, when I attempt to launch VersaMail, the 650 always immediately performs a system reset.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account '': An error occured while attempting to retrieve data from the device.
    Error loading preferences for account 'SprintPCS': An error occured while attempting to retrieve data from the device.
    OK VersaMail with 8 message(s)
    Thanks in advance for help on this, PalmOne. SprintPCS technical support has absolutely no experience as yet on this sort of problem. I was on the line for over an hour covering the same ground I had before calling them. Because this is related to two PalmOne software products -- HotSync and VersaMail, I figure you guys would have a better idea where to start troubleshooting and ultimately resolving this.
    Thanks again!
    Post relates to: Treo 650 (Sprint)

    let's see... digging back into the memory banks here...
    I think I went to www.palmgear.com, and searched for filez, and found it there. to be more specific about your question, though, are you asking how to install files to palm in general (i doubt that just from reading your thread), or rather how to find the filez file in the first place?
    for ease, anyway, here's the URL for filez
    http://www.palmgear.com/index.cfm?fuseaction=software.showsoftware&PartnerREF=&siteid=1&prodID=9992
    strange, too - and you might watch out for this if you have agendus installed on your treo - now when i click on the calendar button next to the phone button, the palm does a soft reset - VERY annoying. I haven't gone through the trouble of finding a fix for that one yet, but will search one of these days...

  • Why does Labview allow a cursor in a indicator?

    Hello,
        Why does Labview allow the user to position the cursor with the mouse inside a numeric indicator? Users think that just because they can put a cursor they should be able to type something and enter data. Is there a way to disable/stop the user from putting the cursor in a numeric indicator?
    Regards,
    Kaspar
    Solved!
    Go to Solution.

    Disabling the indicator satisfies your requirements, but this is funnier.  It would be even better if I calculated the position of the indicator and the "entry point" and just kept the mouse from entering, but I have a project to finish... 
    Message Edited by jcarmody on 03-27-2009 11:58 AM
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    move.png ‏4 KB
    test.vi ‏9 KB

  • Why does firefox cause windows vista to crash

    why does firefox cause windows vistra to crash

    hello, as long as the download-process isn't finished a file gets the .part extension appended - this is the expected behaviour in firefox...

  • Why does my Virtual Server reboots when VM Manager host reboots

    I recently discovered that whenever I reboot the physical host where my VM Manager is running, one of my VM servers reboots as well, and thus bring down the VMs running on that server.
    The VM server is also the ServerPool Master and Utility Server.
    Is this by design?
    Here some info abouyt my set up.
    I have three physical hosts in my set up. One running the VM Manager, and the other two as the Virtual Servers.
    I have configure a private network for them to talk to each other. On the VM Servers, the default gateway and nameserver is set to be the VM Manager host. But I don't have a name server running. The hosts ips are on in the /etc/hosts file.
    Thanks.

    user2593278 wrote:
    I recently discovered that whenever I reboot the physical host where my VM Manager is running, one of my VM servers reboots as well, and thus bring down the VMs running on that server.The only reason this could happen is if there is some form of shared storage being presented by the physical machine running VM Manager that used by the Oracle VM Server(s). Otherwise, there should be no interaction between VM Manager and VM Servers. All communication is initiated by the Manager to the ovs-agent on the Server Pool Master. Assuming the VM Manager goes away, the Pool Master will continue to run and monitor the pool.
    Can you check the /var/log/messages on the VM Server for any indication about what caused the reboot?

  • Why does my iPhoto keep quitting while i'm trying to create a calendar?

    Why does my iPhoto keep quitting while i'm trying to create a calendar

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post other kinds of diagnostic report — they're very long and not helpful.

  • Why does it take so long to access older messages on this site?

    Just curious, but why does it take so long to access the older messages
    (and related responses) on this site?
    When I do a search, the list of results comes up immediately, but when
    I click on an entry to see the full message I run into problems. If
    the entry is relatively new (say less than six months old), the full
    message and related responses displays within seconds, but if it is
    old than that, it can take up to 15 minutes or more to display
    everything.
    I have tried different browser, different operating systems, with and
    without proxies and firewalls, on T1, on DSL, on dial-up, and the same
    thing always happens.
    Anyone know what is causing this, and a way I can fix it?
    Thanks

    Hey that happens to me too....I think they are archived a different way then the new post, so it takes longer to retrieve them.

  • Why does it tell me my ipad is synched with another itunes library and wants to erase the thing when I want to synch it?  I haven't synched it with any other mac but my own.

    why does it tell me my ipad is synched with another itunes library and wants to erase the thing when I want to synch it?  I haven't synched it with any other mac but my own.

    Hi Lisa,
    I know from experience that this must be a frustrating situation for you especially if you don't want to loose the music/video content that is currently on your ipod. Unfortunately though you may have to consider re-syncing it as it thinks its currently synced with another computer.
    If you bought any music that is on the ipod through itunes you can opt to right click the ipod in itunes and 'transfer purchases' if you authorise your library in the 'Store' menu in itunes. Some reasons for this happening may include some of the following:
    Deleting and reinstalling your itunes on the computer.
    Removing the account you had on the computer you used itunes in and making a new one. (User account, eg: Lisa).
    Changing computers in the past.
    A friend or family member syncing it on their computer to give you there music.
    A sign of a failing iPod.
    Alternatively you can opt to not sync it and keep the music that is on your ipod there but this means you will never be able to update your ipod.
    Hope this helps!

  • Why does mavericks mail freeze mac while downloading new mail

    why does my mac freeze up while new emails are being downloaded ?

    Same problems here, too. It started a few days ago. A lot of users seem to have this/these problem(s). Is there still no solution to this from Apple, apart from a complete reset of the iPad? Quite embarrassing issue for Apple - the "settings" are a quite important part of a computer, and one  that shouldn't freeze....
    Other forums suggest it is an iCloud problem (which might explain that contacts does not work - and the calendar without sync is meaningless anyway). After MobileMe, with which many users had similar problems, had to be replaced by iCloud, maybe iCloud  has to be replaced, too. MobileMe, iCloud, next is YouLoose, maybe. Hopefully Apple looks at its own wbsite and works on solutions.

  • Why does my iphone 4s beep while charging?

    Why does my iphone 4s beep while charging?  It seams like it is at every 10% increment, I get a "beep".  I keep the phone by my bed at night and this is bothering me!  This has been happening only for a short while, the phone was new last December.  I do not keep real close track of the last IOS update so I can not "blame" it on that or some "wierd App" that has "altered" my phone!
    So if anyone has an idea, please share!
    Brian

    why don't you bring your phone to Apple for battery diagnostics.  I assume you've tried a different charger and cable.

  • IPhone 4s not being recognized and cannot be activated for service--what does this mean? I can't sync with iTunes. Please help

    iPhone not being recognized and cannot be activated for service--what does this mean? I can't sync with iTunes. Please help.
    When I connect iPhone to USB iTunes is giving me the above message. Please advise if you know the fix.
    Thanks,
    Lina1116

    did you find a fix?

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(“getRealPath = ” + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • Why does iPhoto shuts down when I select Info with an image selected.

    Why does iPhoto shut down when I select Info with an image selected.

    Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library database
    LN

  • Why does the computer lock up while I am securely emptying the trash?

    Why does the computer lock up while I am securely emptying the trash?

    Select  ▹ Force Quit... from the menu bar, then select Finder and press return. From the Finder menu bar, select Finder ▹ Preferences ▹ Advanced and uncheck the box labeled Empty Trash securely. Try again to empty the Trash. If you still have problems, follow the instructions in this support article:
    You can't empty the Trash or move a file to the Trash

Maybe you are looking for

  • Firefox crashes as soon as the page loads it is completely unusable

    i got a update prompt from firefox a few hours ago which i installed and now it wont work as soon as the page loads it crashes it wont even stay on long enough to figure out the problem i swear by firefox i have used its for years and never had any p

  • Purchased app from iPhone won't transfer to iTunes

    I purchased an app on my iPhone and now every time I sync, it starts off with: Transferring purchases from "iPhone", Copying (app) The progress bar get about 10% and then it moves on to the next task such as installing new apps or syncing contacts. I

  • Purchase Order Confirmation in MD04

    Hello Everyone, Our system is set to receive EDI PO Confirmations - Conf Control key 0001, with Confirmation Categories AB and LA. When PO Acknowledgement is posted it shows the correct Conf. Cat. , "AB" on the PO Lines , but in MD04 the MRP field fo

  • PROBLEMS WITH VIDEOS FROM APPLE PAGE

    my macbook pro dont play the videos from the apple page, and tell me i need the AivX something like i download but is not working...

  • Can i get recently added playlist on my iPhone 3GS?

    i know how to make a smart playlist on iTunes but the option turns shaded when i select my Iphone..