I am using NI-CAN with Visual Basic 5.0. Opening and using the can bus works without any errors

. When I use ncCloseObject with the same object handle that I use with the other functions, I get an error. The error I get is 80010004. This is a bad parameter error. The only parameter that is used is the Object Handle. How do I eliminate the error?I am using it on a Windows 95 machine and a PCICan card. I cannot close my program and restart it again. It will not reopen the CAN port.

. When I use ncCloseObject with the same object handle that I use with the other functions, I get an error. The error I get is 80010004. This is a bad parameter error. The only parameter that is used is the Object Handle. How do I eliminate the error?Hello Vernon,
I've attached an example in VB for CAN below. This example ( Object to Object) transmits data from one port and reads from the other port. If you have a Two port CAN card, then you can connect the cable between the two ports and run this example.
In any case, you can verify whether you are closing the object handle in the same sequence as the example.
Let me know if the error still shows up with the example too.
Attachments:
nicanvb.zip ‏8 KB

Similar Messages

  • I bought a used PowerMacPC G5. I can burn and read DVDs, but I can't read or burn CDs. The CDs are not even recognized. After the drive searches for a while, the CD is ejected without any error messages. The CDs work okay on my iMac.

    I bought a used PowerMacPC G5. I can burn and read DVDs, but I can't read or burn CDs. The CDs are not even recognized. After the drive searches for a while, the CD is ejected without any error messages. The CDs work okay on my iMac.
    I am running Mac OSX 10.4.11. According to the System profiler the CD/DVD drive is a "PioneerDVD-RWDVR-112D." When I compare the information under this heading, the only unusual difference from my iMac is that the G5 reads "Burn Support: Yes (Unsupported)." My iMac reads "Burn Support: Yes (Apple Shipping Drive)."
    Under the System Preferences the options are set to "Ask what to do" when a blank CD or DVD is inserted. Music CD set to open iTunes, Picture CD set to open iPhoto, Video DVD set to open DVD player.
    Do you have any suggestions?
    Thanks, Jack

    Hi Jack, great help so far!
    Internal...
    http://eshop.macsales.com/static_pages/Framework.cfm?page=superdrive/sdl_powerma c_g5.html
    External be sure it's Firewire & not Bus powered...
    http://eshop.macsales.com/shop/firewire/optical-drives/

  • I bought an iphone 4s factory unlocked. Can i set it up with my sim card in canada then take it out and bring the phone to iran without any problems?

    I I bought an iphone 4s factory unlocked. Can i set it up with my sim card in canada then take it out and bring the phone to iran without any problems?

    A legitimately unlocked iPhone should work with any compatible 3G GSM carrier. The iPhone, however, is considered 'restricted technology, and cannot be legally taken to Iran.

  • PCI-GPIB Card with Visual Basic gives blue screen and re-boots PC

    The application makes the "ibsic" call then "ibln" to find devices on the bus. Running the VB program the first time is fine, but if you end the program and re-run a second time, you get a blue screen and the PC reboots when the program reaches the lines that make the first call to the NI-488 functions. If you close out of VB and then restart VB, everything is OK again.
    What is wrong?

    Hi,
    Here's an article that describes the most common blue screen when using VB:
    Why Does My Windows 2000 or XP System Crash When I Use Visual Basic to Program GPIB?
    Hope this helps
    DiegoF

  • I downloaded FF4 a week ago and I think I used it only for that night. Ever since I just can not open it as it refuses to load. Prior to this I used the 3.6 edition without any problem. Presently I am using other browsers. What can I do to get it running?

    I just can't get FF4 to load from either the start button or the desktop.

    Have a look at [[firefox will not start]]

  • Why can't visual basic 6 load CWDAQ.OCX in the example programs? I am using the latest Measurement Studio 6 and VISTA OS.

    Can someone help me with getting controls to work with Visual basic 6 in an Vista environment?  I cannot get the examples to work that use the CWDAQ.OCX control.  I did a search on my computer and the file is not even there.  What functions are in CWDAQ.OCX?  Is there a descriptions of what functions are included in this control and other controls?  It is not obvious where to find these descriptions. 
    I did install Measurement Studio 6 with all the options for Visual basic 6.
    I am new to programming NI cards with visual basic so any help in getting me started will be greatly appreciated. 
    I need to talk to a PCI-6110 card in visual basic 6.  I would like to preprogrammed the D/A fifos, store to two analog inputs simutaneously, and use some of the digital I/O.  Can someone direct me the direction as to what controls I need to use?
    Thanks in advance for any help or guidance. 
    Tony

    Hi Tony,
    So the reason you can't find the CWDAQ.OCX ActiveX controls in VB 6.0 in Vista is because that is a Tradtional DAQ (legacy) control meant to work with the Traditional DAQ Driver.
    The Tradtional DAQ drivers aren't officially supported in Windows Vista (KnowledgeBase 4FDH4MZN: Traditional NI-DAQ (Legacy) for Windows Vista OS) and so the CWDAQ.OCX controls don't get installed.
    However, the good news is that the PCI 6110 is a newer card that uses our newer driver, NI-DAQmx. DAQmx is supported in Vista and you can communicate to your card from VB 6.0 using DAQmx in Vista.
    There are several examples that show you how to communicate using DAQmx in VB 6.0.
    These can be found in:
    <Users>\Public\Documents\National Instruments\NI-DAQ\Examples
    This is also mentioned in the following Knowledgebase article:
    KnowledgeBase 47CCSQ5B: NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations
    Also, the DAQmx functions are documented in the following locations:
    Start»Programs»National Instruments»NI-DAQ»NI-DAQmx C API Visual Basic 6.0 Help
    Start»Programs»National Instruments»NI-DAQ»NI-DAQmx C Reference Help
    Hope this helps!!
    Message Edited by Jervin_J on 06-05-2008 02:58 PM
    Jervin Justin
    NI TestStand Product Manager

  • Can you tell me how to measure audio signal frequency in measurement studio with visual basic 6.0?

    I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
    1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
    2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
    Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
    In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
    Wait for your reply!

    Dear kelven,
    Thank you for contacting National Instruments.
    To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
    As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
    http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • Strange axbridge issue with Visual Basic

    I started having a very strange problem with my axbridge wrapped bean around the time I switched to JDK 1.5. Problem is, I can't seem to get rid of it by rolling back to earlier versions.
    Here's what happens: I create a very simple non-visual bean:
    package pack;
    public class Bean1 {
    public Bean1()
    System.out.println("Constructor");
    public boolean someMethod ()
    System.out.println("1");
    return false;
    I then create Bean1.dll using the packager.exe provided with the JDK, and register it as part of the packaging process.
    Then, I go into Visual Basic 6 and enter this code:
    Private Sub Command1_Click()
    Dim xx As Object
    xx = CreateObject("Bean1.Bean.1")
    End Sub
    On the CreateObject call, Visual Basic gives me the error "Object variable or With block variable not set", which isn't helpful.
    In the Java console with level 5 tracing turned on, I see this:
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=1
    basic: Registered modality listener
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@17ba38f
    basic: Current classloader cache size: 1
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Modality pushed
    basic: Joined applet thread ...
    basic: Unregistered modality listener
    The only thing I've found in the bug database that seems even remotely related to this is bug 6391104, which is related to plugins somehow.
    I do not understand why applets are involved in this at all.
    When I try to instantiate the COM object from a C++ program, everything works fine. My problem only seems to occur with Visual Basic (version 6, not .NET).
    This problem seems so fundamental that it seems impossible that no one else has run into it, but there 's nothing about it on any forum or buglist that I've seen. So, I figured there must be something very obscure wrong with my setup. However, I tried installing this on a brand new machine using my trivial case, and I still have the problem. I'm really at my wits' end. Anyone have any ideas?

    You definately want to go to CR 2008. I'd recommed that you call 866-681-3435 and ask about the possibility of getting a 30 day eval.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Need help with Visual BASIC

    I am in an intro to programming course, and I am writing a console on Visual Basic 2013.  My problem with Visual Basic right now is that I cannot get the formula to work.  All of my inputted values end up being 0's.  Am I using incorrect parameters,
    am I misunderstanding how to use arguments; am I not coding correctly?  The scenario for my problem is:
          Areas of Rectangles: The area of a rectangle is the rectangle’s length times its width.  Design a program that asks for the length and width of two rectangles. The program should tell the user which rectangle has the
    greater area, or if the areas are the same.
    //My code is 
    Module Module1
        Sub Main()
            Dim LENGTH As Double = 0
            Dim WIDTH As double = 0
            Dim AREA_1 As Double
            Dim AREA_2 As Double
            Dim RECTANGLE As String = " "
            area1(LENGTH, WIDTH)
            areaCalc1(AREA_1, LENGTH, WIDTH)
            area2(LENGTH, WIDTH)
            areaCalc2(AREA_2, LENGTH, WIDTH)
            decision(AREA_1, AREA_2, RECTANGLE)
            displayDec(RECTANGLE)
            Console.WriteLine("Press any key to exit...")
            Console.Read()
        End Sub
        Sub area1(ByVal LENGTH, WIDTH)
            Console.WriteLine("Please input the following for your first rectangle:")
            Console.Write("Length: ")
            LENGTH = Console.ReadLine()
            Console.Write("Width: ")
            WIDTH = Console.ReadLine()
        End Sub
        Sub areaCalc1(ByVal AREA_1, ByRef LENGTH, WIDTH)
            AREA_1 = LENGTH * WIDTH
            Console.WriteLine("This is the area for rectangle 1: " & AREA_1)
        End Sub
        Sub area2(ByVal LENGTH, WIDTH)
            Console.WriteLine("Please input the following for your second rectangle: ")
            Console.Write("Length: ")
            LENGTH = Console.ReadLine()
            Console.Write("Width: ")
            WIDTH = Console.ReadLine()
        End Sub
        Sub areaCalc2(ByVal AREA_2, ByRef LENGTH, WIDTH)
            AREA_2 = LENGTH * WIDTH
            Console.WriteLine("This is the area for rectangle 2: " & AREA_2)
        End Sub
        Sub decision(ByRef AREA_1, AREA_2, ByVal RECTANGLE)
            If AREA_1 < AREA_2 Then
                RECTANGLE = "rectangle 2"
            Else
                RECTANGLE = "rectangle 1"
            End If
        End Sub
        Sub displayDec(ByRef RECTANGLE)
            Console.WriteLine("The rectangle with the greater Area is " & RECTANGLE)
        End Sub
    End Module

    Hi,
      If you are just beginning to program i highly recommend setting the following options in the Visual Studio menu (Tools/Options). Open the Options window and go to the (Projects and Solutions) and click on (VB Defaults). Now set the options as follows.
    Option Strict - On
    Option Explicit - On
    Option Infer - Off
     And probably one of the most important things to do is learning to Debug your code. That will save you hours of headaches when you get unexpected results in your applications. You will know how to track it down and find where in the code your results
    are being thrown off. There are quite a few Debugging tutorials on the internet. Here are a few decent ones.
    Debugging Express
    Breakpoints and Debugging Tools
    If you say it can`t be done then i`ll try it

  • Problems with visual basic and acrobat X

    Hello,
    In visual basic (excel), I had written a program in visual basic (excel) to open a pdf file on the local server.
    Before I updated to acrobat pro X, I had acrobat pro 8 on my pc.
    With the 8 I didn't had any problems to open the pdf-file.
    Now with the X version, it only opens the start window of acrobat x pro.
    Did they changed something in Xversion?
    Does anyone has an idea to solve this problem?
    Below you can find my visual basic code.
    Thanks in advanced !!
    Sylvie
    Code:
    Sub OpenPDF(bestand As String)
    Dim retval
    Dim sAdobeReader As String
    sAdobeReader = Chr(34) & "C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe" & Chr(34)
    'sAdobeReader = "C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe"
    retval = Shell(sAdobeReader & Chr(34) & bestand & Chr(34), 0)
    End Sub
    Private Sub SelectedPDF()
    OpenPDF ("N:\11276.pdf")
    End Sub

    This is really a user forum, I think you need a developer forum... maybe SDK?
    http://forums.adobe.com/community/acrobat

  • I have always paid for apps with a credit card and now need to use an app store card but I can't get past the point where it keeps wanting my credit card updated.  And can't used the app card number.  Any advice???

    I have always paid for apps with a credit card and now need to use an app store card but I can't get past the point where it keeps wanting my credit card updated.  And can't used the app card number.  Any advice???

    I do NOT like using my credit card if I don't have to, and I went out of my way to go buy an Apple gift card, which I successfully redeemed into my Apple account. However, when I use the Apple "Cards" app, it will not let me use anything other than my credit card. I tried purchasing a card, hopefulling it would come out of my Apple store balance, but no such luck -- it came out of my credit card.
    Apple is becoming more like Microsoft every day.

  • I am using a Mac Leopard and want to know if I upgrade to Snow Leopard (so I can use the new Lightroom 4) will any of my programs be affected.  I will not be able to restore some software and want to know if I'll lose those programs with the upgrade?

    I am using a Mac Leopard and want to know if I upgrade to Snow Leopard (so I can use the new Lightroom 4) will any of my programs be affected.  I will not be able to restore some software and want to know if I'll lose those programs with the upgrade?

    Hello,
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they do still have it:
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    And it's been reported that if you have a MobileMe account Apple will send one free.
    If it's a core Duo & not a Core2Duo, then it'll only run in 32 bit mode.

  • Is there a way to transfer or copy all my apps to another iPad with a different account? I was required in my job to use the one at work, but I would like to also see my current set ups and apps as in my personal one. Thank you so much!

    Is there a way to transfer or copy all my apps to another iPad with a different account? I was required in my job to use the one at work, but I would like to also see my current set ups and apps as in my personal one. Thank you so much!

    What I suggest is that you try to pair your apple ID with you company ipad and see if it works.
    Here is why::
    I believe that the Apple rules let you. They are something like:
    -- for a shared iDevice, you may put the app on one device
    -- for a device you use exclisively, you may put the app on five (or some number) of iDevices
    I'm not lawyer, so how you interpred this is a question.
    Now, you need to figure out how to do this.
    In the past at least, apple used this terminalogy.
        Personal
        Institution
        Layered. combines personal & institution.
    It depends on how your company has configured the iPad.
    I have read where you can have upto three apple id per device.

  • Hi there, can anyone tell me how to make make Garageband ignore HDMI as an audio output-device on a 2013 Mac Mini? Now it keeps on prompting me: Do you want want to use the HDMI device (monitor without audio) for audio output? Thanks in advance, Grtz T.

    Hi there,
    Can anyone tell me how to make make Garageband ignore HDMI as an audio output-device on a 2013 Mac mini i7 using an Apogee jam as an input for bass and a Behringer USB DAC with RCA audio output? Now it keeps on prompting me: Do you want want to use the HDMI device (monitor without audio) for audio output? I'm also suffering massive audio lag issues with the Apogee jam after waking the mini from sleepmode, wich pretty much renders it useless.
    Thanks in advance,
    Grtz T.

    I think the easiest way to do this is to have the EyeTV app running in one user account and sent via HDMI to the TV, and use a separate user account for Screen Sharing. Both logins can be active at the same time and with Lion you can connect via screen sharing to which ever login you need.
    With regards to the Mac video resolution changing, when it is not the current input on your AV receiver. This is 'normal', if the Mac sees no signal it drops down the a lower level. What you need is to buy a HDMI Detective Plus which tricks the Mac in to always seeing a signal and hence it will not drop down the resolution. See http://www.gefen.com/kvm/dproduct.jsp?prod_id=8005
    The Mac mini does have an IR receiver. This can be used with the EyeTV app, iTunes, and similar. Yes I believe EyeTV would run for prolonged periods quite happily, it is has been around for a long time and had most of the rough edges polished off. However one issue you will have to deal with is that it does not automatically update its program guide data. For this you might have to write or modify an AppleScript. Elgato support or their user forums will be a lot of help.
    You can set EyeTV to convert recordings to an iTunes (Apple TV) compatible format and then delete them from EyeTV.
    The HDMI Detective should solve your handshaking problems.

  • After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer.

    After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer. The rainbow wheel was runnig 8 hrs and I turn off mac mini by power button, then I turn on mac mini with key Shift and p/w, checked HD. My HD has
    capacity 499.25 GB used 86.91GB. Is there a solution to fix this problem axcept the reinstall os?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.  
    These steps are to be taken while booted in safe mode.
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal 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 Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    for k in /Sy*/L*/Ex*/{,.?}*.kext; do test -f "$k/Contents/Info.plist" && /usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$_" | egrep -qv "apple|Accusys|ArcMSR|ATTO|CalDigit|HighPoint|hp-fax|JMicron|print|SoftRAID|stex" && echo $k; done | open -f -a TextEdit
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    sudo defaults read com.apple.loginwindow LoginHook | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3 
    Repeat with this line:
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 4
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null | open -f -a TextEdit 
    Remember, Steps 1-4 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

Maybe you are looking for