[C] moveblock problem?

I have a LabVIEW and DLL C of the code.

The C DLL takes a wide range of UINT16 values and it decodes a form of sense.  Data that results are stored in a static table inside the DLL structure.  The Structure consists of integers, floats, strings, and arrays.

The DLL also has a function to return the elements of the structure.  Each structural element is returned as a separate parameter entry.  Some of them are arrays, for example:

void GetMyData (..., unsigned char * myArray [],...);

I know how great 'myArray' is.

In LabVIEW, I have a "call library function Node" for the above function.  For the berries, I used "Pointer digital, full 32-bit signed value".  The "address" that is returned by this call I switch to 'LabVIEW:MoveBlock' call as defined in the examples on this forum.  pre-allocating table that is the correct size and then copying the bytes inside the 'address '.

If I just run my LabVIEW VI crashes.  If I walk through it however (spanning the node library DLL function calls) and then I get the data from the DLL as expected.  However if I then close LabVIEW it crashes.

MoveBlock is safe to use?  Is there another way to get data from a DLL tables?

Thank you.

Looks like you have the library node call correctly put in place, but you initialize the table you're passing in there?  You need to initialize an array of sufficient size or set the minimum table size in the library node call so LabVIEW can do for you.  If you pass an array too short you will probably get an accident since your DLL will attempt to write to this memory location and overwrite something else.

You should also initialize the string that you pass to your DLL if you wait the DLL to fill.

It may also be useful for defining the level of error control dial the node of the library to the maximum for debugging purposes; This can help catch some memory problems.

Tags: NI Software

Similar Questions

  • List of pointers Moveblock

    Hello

    I have a list of memory addresses and use Moveblock to get the values (which is a 640 x 480 arrray 2D in my case). That's just fine until calling Moveblock multiple times (for example using different memory addresses) for all my paintings 2D (120 tables). The problem is that it takes a few tens of ms FRO Labview to generate this 120 X 640 X 480 (when you use a loop that calls Moveblock 120 times). Is it possible to directly call a list of pointers and directly retrieve the corresponding 3D table.
    Best

    Well and where your array of pointers come from? The C code gets just a LabVIEW 3D Board, which is not an array of pointers, but simple a memory table with [column * lines * pages] elements. This is the table that you get after you have copied your array of pointers, which is nowhere to be seen in this code C, with MoveBlock() in a LabVIEW 3D Board. In order to do the same thing you do in LabVIEW with MoveBlock() you must have two parameters, the first being the pointer array (more dimensions 3, C pointers have inherent fixed size information) and the second being the table 3D of LabVIEW, then you must first use LabVIEW memory, from Manager to resize this 3D array handle before starting to copy the data into it using memcpy() or MoveBlock() would be too of work and is only slightly slowever as the best implementations of memcpy().

    Most likely, you won't be able to squezze a lot even if you implement that in memory of C. Copying takes time, if you do enforcement by calling a C function as MoveBlock() of LabVIEW or function as memcpy() in C code. There is a good chance that you can win a little because the LabVIEW diagram code made a few test validation, you can omit in your C code, but it will probably not like some exponential improvement. LabVIEW is implemented in C (++) and generally optimizations where a C programmer will need to spend a little time to get the same level. Of course your particular case of calling external code as MoveBlock() limits the possibility for LabVIEW make a lot of optimization, because he does not know what the code called behind the library node call made (even if you call a function of Manager of LabVIEW here) so it can't do things as the loop place , rescheduling of code and many other things without risking that some unknown to LabVIEW, side effect of the called function would be influenced.

    You think that your LabVIEW code is nothing more than a loop, but it you call in the function MoveBlock and the way you do that which might be important detail that now need us to understand what could be improved. Given that it is such a simple VI I don't understand the reluctance to simply post, but are rather some pseudo-code that you want to do us to complete for you the same thing you did in the LabVIEW code, we don't see.

  • LabVIEW:MoveBlock

    I use the function LabVIEW:MoveBlock of the library call to move data for a call to the DLL that returns a pointer to the data. When I use a smaller size (480K) to the input parameter of 'size', LabVIEW:MoveBlock CLF works fine but when I use the original size (17.5 M), the FCM returns an error code 1097. What is the largest amount of bytes that the CLF LabVIEW:MoveBlock can move?

    Darin - Thanks for the article. However, he made the same mistake I did. When the size of the array will be determined by programming, it is possible that LabVIEW does not enough space. What I was doing was creating programmatically a subset of the larger painting when I wanted just a small section of the table to analyze. It worked well if the table was small enough however when I wanted a complete set of data, it's when LabVIEW gave me the error 1097. What I did to solve the problem was to define the greatest possible diversity and take the subset after the MoveBlock.

    Jeff Merci for your help as well

  • Unable to Scan to the computer after downloading macOS Sierra. Is this a software problem?

    How can I scan from HP Envy 4500 to computer after downloading macOS Sierra?

    Hello wdemetris,

    Thanks for asking for scanning helps here in the Apple Support communities. I understand how it is important to have access to your scanner and am happy to offer help for this.

    As a precaution, we always recommend that you have backups to make sure that all your data is safe. You can perform a backup using Time Machine and an external hard drive. Use this article to help make a backup of your Mac: use Time Machine to back up or restore your Mac.

    Then, in accordance with article help: printer and scanner for Sierra, El Capitan, Yosemite, and the Mavericks macOS software, the HP Envy 4500 e-all-in-one is supported for printing and scanning. The drivers must be installed, but if not, if it please go to the App Store and check the updates tab to see if there are updates for HP. If there is, please install.

    If you have only general questions about how to get your updated scanner in place or how to scan pictures, please check out these two articles: macOS Sierra: implement a scanner & macOS Sierra: scan images or documents. If everything is configured correctly and you still have problems scanning, please visit this help article: macOS Sierra: scanning troubleshooting.

    Thanks again and have a great rest of your day.

  • My iPhone 6 installed 10.0.2 stops when it gets to 40% of autonomy.  In addition, it seems to pass power WAY to fast with the new software.  Does anyone else have this problem?

    My iPhone 6 installed 10.0.2 stops when it gets to 40% of autonomy.  In addition, it seems to pass power WAY to fast with the new software.  Does anyone else have this problem?

    Hello brooksm549,
    Thank you for using communities of Apple Support.

    I got your message which, since updating your iPhone 6 to iOS 10.0.2 your iPhone stops when it is 40% and the power to empty very quickly. I understand your concern with the iPhone turn off and drains the battery. I recommend you to review the use of the battery to see what app contributes more to the battery drain. The following article will provide you with steps on how to check the use of the battery:

    On the use of the battery on your iPhone, iPad and iPod touch

    When you know about the soft uses more battery, you can change your settings in order to optimize the battery life:

    Maximize the life of the battery and battery life

    Best regards.

  • MacBook Pro display problem

    Hello members of the community.

    As of recently, I have noticed some glitches when feeding on my MacBook or awakened from his sleep.

    The colors are distorted, usually with pink, green, or yellow blobs. Blobs cannot entirely replace the colors, they appear to be contained in a element would normally be. For example. the menu bar will be partially pink and white, but pink does not leave the menu bar in this area, and the Office has green lines on it.

    I tried to take a screenshot, but the problem resolves in about 20 seconds, but it's a recurring problem.

    It happens when I wake up, connection or not. I had also certain powers serious and problems of performance, such that my MagSafe LED would not illuminate when plugged on rare occasions, fan could turn unnecessarily, graphics performance were SUPER slow, and the health of my battery was running out quickly. I actually ran a report on the system at 2 different times and my quality of full load is depleting of 1.2% per charge cycle, which is very worrying. I went from 6281 mAh mAh 6138 maximum capacity after two cycles of load. I'm tracking closely it because at this rate, my battery will survive only at load cycles about 150 instead of the 1000 expected, gives me the idea that this could very well be a bad battery. The computer is also warm to the touch while you sleep, not connected to the power supply. I NAP active but even taking into account should not be hotter my iPhone did the same thing.

    I have reset the SMC, and it solved a couple of problems. The charger works fine now and my performance improved considerably (which made me feel better, either it is a high-performance laptop, a 11-inch MacBook Air should not he surpass), and battery life has improved. I feel even if it uses a lot of power in his sleep. Maybe I need to turn off the NAP and see if that makes a difference. The graphic bug still persists however, and I don't have enough time to see if the max battery is depleting again.

    In regards to the bug, is there something that can be done? Basically, I want to assure you that I took all appropriate measures or if someone else has this problem to see if it can be software related instead of my computer.

    I have the entry level MacBook Pro with the retina, last generation.

    Any constructive contribution welcome!

    See you soon.

    -adreaux

    Hello bernardn753,

    After reviewing your post, it seems that you are having problems with the screen showing strange things on it. Looks like you already have a troubleshooting. I recommend you read this article, as reset NVRAM would be to reset your screen resolution settings that should help.

    How to reset the NVRAM on your Mac.

    Thank you for using communities of Apple Support. Good day.

  • with IOS 10.0.2 - 5s iphone Bluetooth problems

    Since upgrading ISO 10.0.2 my M50 from PLT Plantronics (helmet unique headset) do not reliably connects with my iPhone 5 more. I have to go to the settings, activate bluetooth turned off/turned on, touch the device on the bluetooth page, etc. Once it connects successfully, it will reconnect (if I turn off the headset and turn it back on) for a short period. The next day he does not connect itself but I play with bluetooth on the iPhone again.

    It has always worked perfectly before the 10th of IOS.

    And, as I noticed others mentioning, the volume is much lower with IOS 10. The maximum volume is much lower. I can barely hear it now, more normal background noise, while driving.

    I did:

    Forget this device for the PLT M50 and paired again (several times)

    I did a Reset Network Settings

    I don't know what else to do - but it's a 10.0.2 IOS issue.

    Hello AppleUser2k,

    Please ask questions about your problems of connection between your iPhone and your Plantronics headset since you upgraded to iOS 10. I understand how important it is to have your Bluetooth devices connect with your iPhone with reliability. Here's what I recommend.

    The first thing we want to make sure is that all your data is safe. You can perform a backup in iCloud or iTunes using this article: backing up your iPhone, iPad, and iPod touch.

    Once your data is safe, try the troubleshooting steps in this article to help: get help to connect a Bluetooth accessory with your iPhone, iPad or iPod touch device should also check with the manufacturer that the device has all the drivers and firmware to work with the new version of iOS.

    If you have checked everything and that you have installed the latest firmware or driver and always are problems, please be aware of your surroundings when you encounter these problems. If you can isolate the time or location, you see the problems, you can isolate the cause. You can even see this help article to ensure that you are not affected by outside interference: the potential sources of Wi-Fi and Bluetooth.

    Thanks again and have a great rest of your day.

  • Problem after update 10.0.2 iOS iPhone touchscreen

    After I have updated to iOS 10.0.2, I noticed a problem with the touch screen. Using the position of the image on the right side, near the corner, the toushscreen does not work.
    For example: when you use the keyboard, I can't type the letter 'P', have trouble typing BACKSPACE. Using the Contacts app, I can't scroll through using the alphabet bar.

    Do what idea of the problem?

    Kind regards!

    Hi fabriciorela,

    Thanks for the upgrade to iOS 10! I understand that the right of your screen is unresponsive to the touch. You can try the steps in this link to fix the problem. If the screen of your iPhone, iPad or iPod touch does not respond to touch

    If it does not help the problem, try to restore the device to factory settings. I would like to backup your important data first.

    The backup of your iPhone, iPad and iPod touch

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod to factory settings

    Please use the Apple Support communities to post your question. Let us know how it turns out. Have a great day.

  • Bluetooth connection problem iPhone - audio system Nissan after upgrade iOS10

    After iOS10.0.2 iOS9 on iPhone upgrade, I got a cordially problem receive calls raise Nissan car audio.

    I can make a call without any problem. Bluetooth connection is stable. I can download address book e.t.c. But I can't receive a call. I see the incoming call on the radio shows. After pressing the button "answer" on the car Audio System, audio between iPhone and Audio streams car breaks down.

    But the cellular connection remains active. I need to rotate the audio output on the screen of the iPhone car for iPhone and back to the car. After that, I can continue my call via the car radio.

    Thanks in advance

    Hello StasV,

    Thank you for using communities Support from Apple. I know having a problem with calls on your iPhone in your car, it's not what you expect. The good news is that these steps will be useful for your problem of phone calls while using the bluetooth in your car. Go to settings > general > accessibility > routing of Audio calls and the value headset/Bluetooth Headset and retest your question.

    Audio routing call - the iPhone user Guide
    Help to connect your iPhone, iPad or iPod touch with your car radio

    See you soon!

  • 2 iphones on one iTunes, problem of photo icloud account

    OK, my brother-in-law just updated its OS on his Iphone. He shared an Apple ID with his wife, who has his own iPhone. They all have two backup only in iCloud. His problem is that his wife photos are now on his phone. How can he fix it?

    Get its own identifier Apple- create and start using a Apple - Apple Support ID

  • Problem activation ISO 10 September 2016

    After my Ipad iOS 10.0.2 update I could not activate because it says I am not access with the original Apple journal. Makes no sense. I bought the new Ipad in seven of 2013 Dabs.com. She has been linked to my Apple account 10 days ago (I deleted my profile by own Apple support Web site suggestion as a way to fix my problem, the other restoration/upgrade to the Ipad with ITunes update). I contacted the support of Apple (I have two numbers in case Apple). Asked Apple support to provide a proof of purchase I made. Told me now the reception that I provided does not correspond to my Ipad, but Apple isn't going to help with all the details to help to regularize the situation. The Ipad is mine and well was linked to my account from the date of purchase in September of 2013 until I removed it at the suggestion of site specific help from Apple. I now do not have access to my ipad £460 for more than 10 days and have lost money and time talking to 4 different cooperatives of Apple, after 6 calls and none seem able to deal with a ridiculous situation. Alexandre Vitorino (Apple) seems to have the best handle on weird how this situation is. Please can someone fix this? A software update on an Ipad that I own shouldn't stop me using it and then force me to prove that I admit actually before I use it again! I'm a professional businessman who uses it for meetings of the Council. I have a receipt for my camera and get treated like a kind of criminal.

    My sincere sympathy for those who can't find their original receipt or forget their original log-in Ipad because Apple does not help, you and your Ipad will be also useless mine is currently!

    If you are in the same situation please confirm to this post. I can't be alone, if she feels like it!

    Post edited by: cibble10

    Lock activation occurs when the ID of original Apple blocking it does not match with your current Apple ID.

    Until you can bring a receipt valid from an Apple reseller or authorized, it's nothing you can do.

    BTW, the polling stations in this Apple-owned forums is prohibited. You can review the terms of use.

  • Anyone know how to solve my problem? I can't import my photos from Iphone to computer. Sign says: Photos in the camera cannot be imported because the IPhone is locked with a password or read. My phone is unlocked. I've tried everything

    Anyone know how to solve my problem? I can't import my photos from Iphone to computer. Sign says: Photos in the camera cannot be imported because the IPhone is locked with a password or read. My phone is unlocked. I tried everything, every single idea. Without success! Any other idea?

    For example, you specify that the device does not display the lock screen, correct? Do you use Touch IDS? If so, try to put your finger on the device to see if it's what he wants.

    See you soon,.

    GB

  • icloud in the iPhone activation problem 6 more

    IM someone buy iphone 6plus they don't sign Apple ID and icloud, I reset my phone and now I'm still icloud activation problem.how can I do?

    You can not. The only way is if the previous owner release form their iCloud account. If they will not do for you, it means nothing to you.

  • Phot of problem analysis

    Hello

    I have a problem with the app photo with Sierra.

    I 107755 pictures. the analysis of people started

    but he remains arrested with 519 photos

    I tried to fix the bookstore. restart analysis but still stuck to 519 phoos.

    Does anyone have the same problem and a solution?

    Thank you

    Thomas

    How long it has been blocked? You have a very large library so I keep the Mac awake and fed and the Photos doesn't work does not and give him a few days - usually messing slows it rather than speeding it and is a 'restart Yvert"command

    lN

  • Problems with 10.0.2 update

    Hello

    I've updated my iphone 6 night on Sunday, October 02, with the 10.0.2 update of apple's software. At updating my iphone, it initially only allowed me to enter a number of characters in texts/emails and started to crash / black. I rebooted my iphone (turn turn off/lit) and it has stopped working all together do not allow me to enter a digital/access code footprint. The phone had left the charge and did not work for two days.

    Yesterday (Wednesday, October 05) I backed up my phone to the icloud and resinstalled scratch. After many hours of pursuit, my iphone allows me today, but again once hangs on applications and allows once again only a certain number of characters to type in any application.

    I am 37 weeks pregnant (considered term) and I need to access emergency calls in case my baby arrives more early. My husband works away and I have no family nearby.

    No idea how I get my iPhone to work entirely without crashing or return to the previous iPhone platform without having to now continue with local ACR? I need my laptop to work, mainly because of the situation, I'm in and need this sorting as soon as possible.

    Advice welcome.

    Thank you

    Sue - A

    Hi Sue - A Q,

    I understand that your device hangs after upgrade to iOS 10.2, and limit the amount of text, you can enter on the keyboard. Since the normal restart has not solved the problem, please try to backup the device and using iTunes to restore it to factory settings without restoring all the data. Instead, configure the device as good as new. You can use your iCloud Apple id to synchronize between your contacts and calendars, etc. Test question to verify that it has been solved. You can use the purchase history App store for re download your applications.

    The backup of your iPhone, iPad and iPod touch

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod to factory settings

    Download your latest purchases

    The links above should help you with the procedures, I suggested. Please use the Apple Support communities to post your question. Good day.

Maybe you are looking for

  • How can I fix a few contacts that I cannot text or cannot attach a photo to text?

    I have an iphone 6 s and some contacts in which the text bubble is not available under the contact info. There are also a few contacts in which I can not click on the photo icon to attach a photo in text messaging. Photo icon is grayed out. How can I

  • Lenovo IdeaPad K1 and Limitations of synchronization software!

    Why is the synchronization software provided customers limited to the transfer of data to the MicroSD port exclusively when you can also send data from internal storage?

  • E250 v2 not showing the songs or photos

    After updating my E250 girls with the last firmware update, now when you go to play songs he says no songs available. Pictures are in the same way. It worked fine before the update of the firmware. When connect you to the computer, under my computer,

  • How to reinstall Vista after Windows 7 test is over?

    How can I reinstall a prepackaged vista on a compaq sr 5000 operating system after the expiry of the trial version of windows 7

  • Things bounce around

    I am running Windows 7.  The following problems seem to have started after I upgraded to Microsoft Office 2007 to 2010. After loading Microsoft Office 2010, I clicked on start, all programs and Microsoft Office.  That's when I first noticed problems.