Is there a C version that does what the MAX 1-D Interactive does?

Is there a C version that does what the MAX 1-D Interactive does?  Or a solution to the problem below.
I got the MAX 1-D Interactive to work with my stepper motor.  The hardware setup is at the bottom.
I am trying to write a C program in Visual Studio 2010 to control a stepper motor. I found an example program called 1D Straight Line Move.c in
C:\Program Files\National Instruments\NI-Motion\Documentation\Examples\NI-Motion Help\C
I copied the example file and the needed .h, .c and .lib files into a Visual Studio project.  I changed the velocity, acceleration, and deceleration to match the values in the MAX 1-D Interactive.  The solution builds, but when I run it I get the following error message
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Setup:
I am running the latest NI Motion Software.
PXI-7334 connected to UMI-7774 using I/O Motion cable
UMI-7774 connected to P70360 Stepper Driver using control cable
P70360 Stepper Driver connected to NEMA 23 (T21NRLC) using Orange (A-), Black (A), Yellow (B-), Red (B)
NEMA 23 is powered by 120V AC power supply
P70360 Stepper Driver is set using DIP Switches (I tried to use the P7000 software tool that came with it, but it never found the driver):
S1: 1
S2-1: Off
S2-2: On
S2-3: On
S2-4: On
S2-5: Off
S2-6: Off
S2-7: Off
S2-8: Off
S2-9: Off
S2-10: On
S2-11: On
S2-9: Off
Attachments:
1D Straight Line Move.c ‏5 KB

No I am not using Visual C++ MFC.  I am using an empty C++ project in Microsoft Visual Studio 2010. Although I eventually want to create a .exe file from this project so I'll have change project type.
The motor runs using MAX to control it. 
It did run using the 1D Straight Line Move.c project, but it gave me the below errors.  That night I unplugged it because the stepper motor gets hot.  The next day MAX still moves the motor but the 1D Straight Line Move.c project doesn’t and I still get the errors below.
I am getting two errors:  (I was getting the same errors yesterday)
Run-Time Check Failure #2 - Stack around the variable 'errorCode' was corrupted.
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
I think the errors come from using the functions in flexmotn.h.  The functions look like they are being used correctly, but I can't find where they are defined.  They are probably defined in FlexMS32.lib.
I attached the files I am using.
I haven’t tried any of the other examples.  1D Straight Line Move.c looks like the simplest and closest to what I want to do.
Attachments:
Files.zip ‏82 KB

Similar Messages

  • In the previous version, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    in the previous version  of Number, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    Hi silvano,
    If you use a regular pattern when entering values, press enter (return) after entering the last value in a row. That will take you to the first Body Cell of the next row.
    Start in Cell B2
    1 Tab 2 Tab 3 Enter
    4 Tab 5 Tab 6 Enter
    7 Tab 8 Tab 9 Enter
    Now you are ready to type into B5 .
    Another way that some people find easier is to enter one column at a time
    Start at B2
    1 enter
    4 enter
    7 enter
    etc.
    Now start with C2.
    Use whatever suits your work flow.
    Regards,
    Ian.

  • I am registered  for adobe premiere elements ver 3 . .Any body know where I can find it to down load ? Or is there a newer version that I can download that my serial number will work with ?

    I am registered  for adobe premiere elements ver 3 . .Any body know where I can find it to down load ? Or is there a newer version that I can download that my serial number will work with ?

    There is no download available for version 3 that I am aware of - version 9 is the oldest available offered by Adobe.  Serial numbers are only valid for the version they were purchased for.

  • HT3842 Those steps don't work. I'm using the lastest version of itunes (11.0.1.12) on Windows. This article was last updated in 2009 and lists itunes 7.7. Anyone have any ideas, or is there a new article that accounts for the changes to itunes?

    Those steps don't work. I'm using the lastest version of itunes (11.0.1.12) on Windows. This article was last updated in 2009 and lists itunes 7.7. Anyone have any ideas, or is there a new article that accounts for the changes to itunes?

    Try This
    http://support.apple.com/kb/PH12359

  • Is there a reader version that will open protected school books on galaxy note?

    Is there a reader version that will open protected school books on galaxy note?

    Have you tried the Adilko app for Android? Works good.

  • Is there a flash player that works on the ipad

    is there a flash player that works on the ipad

    Re: Flash player for Ipad
    Aug 14, 2011 2:22 AM (in response to phaisto)
    Folks, here's the sad truth, according to Engadget:
    "After nearly 4 years of the iOS platform, Adobe is still having difficulty being able to get Flash Player on Apple’s mobile platform. Many sided with Adobe on this one a couple of years ago calling this exclusion unreasonable, but the latest failures for Android Honeycomb to deliver decent Flash performance justifies Apple's decision. Even the Frash hacks bogged down the 1st generation iPad and the PlayBook had problems bring Flash to their Blackberry Tablet."
    Some months ago, before I really researched this issue, I was determined to "get around Steve Jobs obvious hidden personal and business greed agendas" and run Flash on a tablet. So I bought an ASUS Transformer Tablet just to be able to run flash (a $400 "app")! OK, just a wee bit over the top. But, I can now personally testify to the surprisingly disappointing performance of Flash on Android.
    Based on that confirmation, and on numerous reports from those running Flash on jailbroken iPads, either Adobe has lost all of it top notch programmers to Google, Facebook, -- and likely even Apple! -- or it never has been serious about porting Flash to iOS (I suppose this could have been intentional, thinking that the absence of Flash would do serious harm to the platform once folks found out).
    But whatever. I am finally over my Flash of "brilliance" and resigned to just skip over the web sites that require Flash, and wait till I am at my iMac or PC to do those that are really necessary. And, despite that the ASUS Tablet does technically run Flash, it does it so poorly that I preferred to use my Mac or PC.
    I gave the minty new ASUS Tablet which is otherwise a nicely done, but still "work in progress" (unlike my Android phone) to my med school daughter. She loves it -- and now calls me all the time to talk, usually about how to get stuff to work on it (but any excuse to talk to her is good by me ;-).

  • There is suddenly a gray shelf under the app icons in dock. does anyone know how to get rid of this?

    there is suddenly a gray shelf under the app icons in dock. does anyone know how to get rid of this?

    Take a look at the various suggestions in 'More like this'  >>>>>>>> to the right of your original post.   And don't forget the links within the threads.   Several people have had that problem.

  • The version of OLE on the client and server machines does not match. (Exception from HRESULT: 0x80010110)

    Hi,
    I have installed FIM CM Client on one machine and FIM CM update service on another machine. Both are windows server 2008 r2 machines.
    When i try to enroll a permanent smart card for a user, its shows me the following error:-
    The version of OLE on the client and server machines does not match. (Exception from HRESULT: 0x80010110)
    Also there is no logging done for the particular event.
    I am able to change my smart card pin and view my smart card info. through the FIM CM client. 
    Is there a compatibility issue of FIM CM 2010 with Windows server 2008 r2?
    Thanks

    Hi,
    Sorry for the delay in reply.
    Please try the following steps first:
    Open Powershell as Administrator
    Go to Start--> Run and type wbemtest.exe.
    •Click Connect. 
    •In the namespace text box type "root" (without quotes).
    •Click Connect.
    •Click Enum Instances…
    •In the Class Info dialog box enter Superclass Name as "__ProviderHostQuotaConfiguration" (without quotes) and press OK. Note: the Superclass name includes a double underscore at the front.
    •In the Query Result window, double-click "__ProviderHostQuotaConfiguration=@"
    •In the Object Editor window, double-click HandlesPerHost.
    •In the Value dialog, type in 8192
    •Click Save Property.
    •Click Save Object.
    Under properties find the property "MemoryPerHost" or any other ones you need to modify  and double click it
    Change the value from 512 MB which is 536870912 to 1GB which is 1073741824
    Click Save Property
    Click Save Object.
    •Close Wbemtest.
    •Restart the computer.
    And if all nodes are Windows server 2012, install the following update rollup as well:
    Windows RT, Windows 8, and Windows Server 2012 update rollup: August 2013
    http://support.microsoft.com/KB/2862768
    If you have any feedback on our support, please send to [email protected]

  • My iphone was stolen and we actually recovered it!  Is there a way I can tell what the thief might have looked at in the interim? I know about hitting the home button twice to see recently used apps, but what if they then swiped to close them?  TIA

    My iphone was stolen and we actually recovered it using the find my iphone app!  Is there a way I can tell what the thief might have looked at in the interim? I know about hitting the home button twice to see recently used apps, but what if they then swiped to close them?  i just want to know if this <bleep> was looking through my private info.  TIA

    Sorry marcia,
    There is no way to tell what activity went on on your device when it was out of your hands.
    Sorry,
    GB

  • Is there a note app that syncs with the native iphone notes app

    Looking for a feature rich app to pull notes from the native iPhone app.   I Like holding down the home button to tell Siri to take a note but want to do more with the note after she has taken it.  Is there a note app that pulls from the basic iPhone notes app?

    You Both can Add one email Account on Both Phones and then sync the Calender With Email - This way when one will add a reminder or event it will automatically synced to the other
    Regards Eree - Follow me on Twitter - Facebook - Google+
    For More visit My Blog

  • I've tried the new iWork and feel cheated. I'm gonna stick with my old '09 version. It appears to have lost utility, and is now easily surpassed by Word 07. Is a new version that's worth the money and hype coming?

    I've tried the new iWork (on a friend's new MacBook Pro) and feel very disappointed. I'm gonna stick with my old '09 version. It appears to have lost utility, and is now easily surpassed by Word 07. Dear Apple, from a veteran user: In your rush to market, you have dropped the basket on this one! Is a new version that's worth the money and hype coming?

    Welcome to Apple Support Communities
    A lot of users have complained about the lack of features of the new iWork version. However, I'm sure Apple will add features with more updates in the future, like with Final Cut Pro X. See > http://support.apple.com/kb/HT6049?viewlocale=en_US&locale=en_US
    Until then, you can carry on using iWork '09, or try Microsoft Office 2011 or even LibreOffice, which is free and open-source

  • My iphone fell into the toilet so i am trying to use my imessage app on my mac to text my friends and it is saying my password is invalid. Is there anyway to fix that or reset the password for it? Thanks

    my iphone fell into the toilet so i am trying to use my imessage app on my mac to text my friends and it is saying my password is invalid.
    Is there anyway to fix that or reset the password for it? Thanks

    Hello jthompsonn25,
    I'm sorry to hear about your iPhone and the issues you are having with Messages on your Mac. If you are trying to send iMessage messages in Messages, your iMessage account should be tied to your Apple ID (same account name and password). If you are having password issues in Messages, you may want to verify that you have the correct password by logging in to your Apple ID directly:
    Apple - My Apple ID
    If you are unable to or are still getting an error message with your password, you may need to reset the password on your Apple ID. If that is the case, you may find the following article helpful:
    If you forgot your Apple ID password - Apple Support
    Sincerely,
    - Brenden

  • Is there a DTP programme that comes with the standard Macbook Pro or would I have to buy Pages etc?

    Is there a DTP application that comes with the standard Macbook Pro or would I have to buy Pages or a similar app? Thanks.

    http://store.apple.com/us/browse/home/shop_mac/family/macbook_pro?mco=MTM3NjU5Mz U

  • Flooded with error: Table RequestUsage_PartitionX has 442892288 bytes that has exceeded the max bytes 442857142

    Hi all,
    Since last week my 2013 farm (3 WFE, 3 App server, SQL 2012) application event log flooded with error every 5 minutes.
    Table RequestUsage_PartitionX has 442892288 bytes that has exceeded the max bytes 442857142. 
    I have google the error and only found Steve Mann's blog discussing about this.  Yet there is no additional information in terms of how to fix it.  Just wondering if anybody has seen this and know how to fix it? 
    Appreciate any suggestion and thanks in advance.
    Sally

    Hi  Sally,
    Thank you for your posting!
    For your error, it is coming from the Usage Infrastructure. The root cause is that your SharePoint Server  usage data is exceeding the daily partition size for the logging DataBase.
    For more detailed information, you can refer to the blog:
    Blind spots in Usage file and Web Analytics Reports
    Thank you for your understanding and support.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Table RequestUsage_Partition14 has 445538304 bytes that has exceeded the max bytes 442857142

    Dear All,
    Since last 4 weeks my SharePoint 2013 Farm facing Error in Event Ever such as "Table RequestUsage_Partition14 has 445538304 bytes that has exceeded the max bytes 442857142"
    Kindly do let me know how we can resolve this issue.
    Thanks in Advance.
    Pravin Dhulap

    Hi All,
    I have updated the below script on our test Environment and i am not bale to see this error in Error log.
    add-Pssnapin Microsoft.SharePoint.PowerShell
    $UsageDefinition = Get-SPUsageDefinition -Identity "Page Requests"
    $UsageDefinition.MaxTotalSizeInBytes = 21884901888
    $UsageDefinition.Update()
    and i have used smae script on PROD server but the i am still receiving same error.
    Kindly let me know if there are any settings needs to be done or not??
    Kindly provide the solution if anyone of you has it.
    Thanks.
    Pravin Dhulap

Maybe you are looking for

  • Questions regarding creation of vendor in different purchase organisation

    Hi abap gurus . i have few questions regarding data transfers . 1) while creating vendor , vendor is specific to company code and vendor can be present in different purchasing organisations within the same company code if the purchasing organisation

  • When I play music, it seems to 'skip' at the beginning

    I listen to music a lot on my iphone.  I noticed this originally on my iPhone 4 and was assuming that it was due to the slow processor and limited memory of the '4'. I recently upgraded to an iPhone 6 with 128GB of memory and it still does has the is

  • Problems getting xMAM 3.0 SR3 working (no data is replicated to the client

    Hello members, I'm new in xMAM configuration. I followed the different instructions to get the thing working. 1. Installed MI on client 2. Installed xMAM on client 3. Created RFC on middleware & on backend (for server-driven) 4. Imported SyncBOs 5. D

  • XML and InDesign

    Hello, I just started working with InDesign and I have some questions. Ideally I would like to use InDesign as a scriptable WYSIWYG platform that will compile and XML doc and indicate the (x, y) position of artwork and text. I make educational items

  • Dependant(?) Data Merging

    Windows 7, InDesign CS4, Excel 2010 I hope this makes sense:      I have a project that involves making labels for about 800 SKUs. I've merged data before when making labels like this and it worked great (it's been a while though). Anyway, this proje