Handling C DLL pointer variables in LabVIEW 7.0

Hi,
 I am developing an application in LabVIEW 7.0 which talks to hardware using 'C' Dlls. The ourput of 'C' Dlls are pointer references to integer values. I used Call Library node and there for output parameters, I said value by reference. Even then I am not getting the expected output.
Can you please help me in solving out this problem
Thanks,
Poornima

Hi Poornima,
Whenever you're in doubt how to pass different data types from and to a
DLL, please refer to the shipping example called "Call DLL.vi". It
includes examples for almost all possible data types.
Have fun!
- Philip Courtois, Thinkbot Solutions

Similar Messages

  • How to call this dll point function by labview

    Void SetCompStatusCallBack(void ((*CompStatusCallBack)(int id, int status, unsigned char conflict)))
    Sets up callback function for getting component status.
    Parameters:
    * CompStatusCallback – entry point for callback function.
    Return Value:
             None.

    left wrote:
    Void SetCompStatusCallBack(void ((*CompStatusCallBack)(int id, int status, unsigned char conflict)))
    Sets up callback function for getting component status.
    Parameters:
    * CompStatusCallback – entry point for callback function.
    Return Value:
             None.
    You don't. This is the callback protoype that would be passed as parameter to another API and as such never will be called by the caller of that API but instead be provided by that caller!
    And LabVIEW does not support function pointers at all, so you really can't do this.
    The only solution is to write a wrapper function in your DLL or in a separate DLL that translates between this interface and some more event oriented LabVIEW functionality such as user events, but unless you do know C to a fairly good level, you should probably leave that to someone else.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-26-2007 04:21 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Making dll from VI containing labview global variable ?

    I've made dll from VI containing labview global variable.
    But, when I write a c program calling a function from the dll, it returns just error.
    The goal is to read a labview global variables from c program. What can i do for it ?

    Hi
    If you don't use the dll in your LV app, it will be difficult, because it will be in the adress-range of you c app. So any writing of values to the global variable in LV, won't affect the variable in the dll.
    What you can do is some kind of client-server architecture. You need a third app, which just does the data exchange - so you should be able to write a value from LV and read it from c.
    There already have been discussions about similar topics - just search the forum.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Nilvaiu.dll pas trouvé avec LabVIEW 821...

    nilvaiu.dll pas trouvé avec LabVIEW 821...
    Impossible de reprendre un vi créé avec LabVIEW 820 : pb au niveau de l'assistant DAQ.
    Merci d'avance.
    T.

    Peux être un début de solution :
    http://digital.ni.com/public.nsf/allkb/A64B6D4665F7C8C686257248001D7656
    Trouvé sur la knowledge base NI, un bon point de départ pour trouver des solutions
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Having Trouble Copy and Pasteing Local Variable in LabVIEW 2010

    I am Having Trouble Copy and Pasteing Local Variable in LabVIEW 2010 in s subVI.
    I have a VI that has a Local Variable called "Node Addr". I can select it OK, and it appears to Copy OK, But when I go to paste it, nothing appears. It doesn't matter if I use Cntrl-C Cntrl-V or the Copy and Paste from the Edit menu, I get the same results. I tried many times and got the same results. I made sure that I had click a paste location. I can insert the Local Variable if I use the Data Communication panel.
    On one of the Paste, I got an error in the error list that said that a Local Variable was not connected to anything. When I clicked on the error, it took me to an insible item in the lower right corner of the block diagram that had nothing but a select box around it. I couldn't select the invisible item, but I could delete it.
    Why does the copy and paste of this local variable not work?
    Why does the paste cause the insertion of an invisible item?

    dbaechtel wrote:
     My VI is fairly complicated. In several places in the VI, I am either reading or writing to this variable which is an numeric Indicator on the Front Panel. Using local variables seems to be the best way to handle this situation rather that using wiring all over the VI. Since the VI is mainly a State Machine and there are only 2 Writes to the local variable, I am not afraid of race conditions in this case.  NO!! While you may think that using Locals is your solution to wiring, it is not!  The fact that you are writing and reading, most likely from several places, will most definitely contribute to a race condition.  Depending on your implemetation, you should ALWAYS use wires.  The wires are the variable.  If you are using a loop (While, For), then using shift registers are appropriate means for routing values so that they are used by other sections of the code, later.  One thing you must respect with LabVIEW is the dataflow.  That's where Locals often fail.
    I am not copying the Local Variable from one VI to another.
    I am not copying the Local Variable from one VI to another.
    The Data Communication panel is one of the panels that shows up in the Functions pop up list when editing the Block Diagram. It is the panel that includes the Local Variable function.
    I don't know if the invisible item that was inserted in my block diagram was hidden or not. All I know is that the Errors List said that it was a Local Variable and that it was not connected to anything. I couldn't select it to get more information. All I could do was delete it.
    You did not address my questions about why the Copy and Paste does not work properly for my Local Variable.  Maybe it's a sign from the Software Gods not to use them LOL!..
    So if I understand correctly, you are trying to copy & paste the Local Variable from within the same VI.  How large is your block diagram?  Did you try right-click on the variable and select "Find > Local Variables"?  If it's a block diagram larger than 1 single screen (which it shouldn't), then it is possible that the Local is hiding beyond the screen.  You should find it as I described earlier.
    See my comments in red above.

  • BUG: unable to handle kernel NULL pointer dereference at 0000000000000

    5月 18 18:18:55 thinkman kernel: [<ffffffff81077683>] do_exit+0x3b3/0xbb0
    5月 18 18:18:55 thinkman systemd[1]: Stopping Create Volatile Files and Directories...
    5月 18 18:18:55 thinkman systemd[1]: Stopped target Local File Systems.
    5月 18 18:18:55 thinkman systemd[1]: Stopping Local File Systems.
    5月 18 18:18:55 thinkman systemd[1]: Unmounting Temporary Directory...
    5月 18 18:18:55 thinkman systemd[1]: Unmounting /boot...
    5月 18 18:18:55 thinkman kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000418
    5月 18 18:18:55 thinkman kernel: IP: [<ffffffffa04d293f>] pppoe_release+0x15f/0x1d0 [pppoe]
    5月 18 18:18:55 thinkman kernel: PGD 0
    5月 18 18:18:55 thinkman kernel: Oops: 0000 [#1] PREEMPT SMP
    5月 18 18:18:55 thinkman kernel: Modules linked in: veth xt_addrtype xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 n月 18 18:18:55 thinkman kernel: rtl_pci rtlwifi crct10dif_pclmul crc32_pclmul mac80211 crc32c_intel ghash_clmulni_intel aesni_intel i915 aes_x86_64 l月 18 18:18:55 thinkman kernel: CPU: 0 PID: 637 Comm: pppd Tainted: G O 4.0.2-1-ARCH #1
    5月 18 18:18:55 thinkman kernel: Hardware name: LENOVO 20EH0001CD/20EH0001CD, BIOS J5ET42WW (1.13 ) 01/22/2015
    5月 18 18:18:55 thinkman kernel: task: ffff8800ab4d1440 ti: ffff8800a7a00000 task.ti: ffff8800a7a00000
    5月 18 18:18:55 thinkman kernel: RIP: 0010:[<ffffffffa04d293f>] [<ffffffffa04d293f>] pppoe_release+0x15f/0x1d0 [pppoe]
    5月 18 18:18:55 thinkman kernel: RSP: 0018:ffff8800a7a03be8 EFLAGS: 00010202
    5月 18 18:18:55 thinkman kernel: RAX: 0000000000000000 RBX: ffff8802404a9000 RCX: 000000000000002c
    5月 18 18:18:55 thinkman kernel: RDX: ffff880244e67810 RSI: 0000000000000200 RDI: ffffffff8145ce02
    5月 18 18:18:55 thinkman kernel: RBP: ffff8800a7a03c28 R08: 0000000000000000 R09: 0000000000000000
    5月 18 18:18:55 thinkman kernel: R10: ffff880244e67810 R11: 0000000000000001 R12: ffffffffa04d4280
    5月 18 18:18:55 thinkman kernel: R13: ffff8800a7e50000 R14: ffff88024596a920 R15: ffff88024215ce40
    5月 18 18:18:55 thinkman kernel: FS: 0000000000000000(0000) GS:ffff88024f200000(0000) knlGS:0000000000000000
    5月 18 18:18:55 thinkman kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    5月 18 18:18:55 thinkman kernel: CR2: 0000000000000418 CR3: 000000000180b000 CR4: 00000000001407f0
    5月 18 18:18:55 thinkman kernel: Stack:
    5月 18 18:18:55 thinkman kernel: ffff8800a7e50030 0000000000000008 ffff88024596a920 ffff8800a7e50000
    5月 18 18:18:55 thinkman kernel: ffffffffa04d4280 ffff8800a7e50030 ffff88024596a920 ffff88024215ce40
    5月 18 18:18:55 thinkman kernel: ffff8800a7a03c48 ffffffff81458c6f ffff880244e67800 0000000000000008
    5月 18 18:18:55 thinkman kernel: Call Trace:
    5月 18 18:18:55 thinkman kernel: [<ffffffff81458c6f>] sock_release+0x1f/0x90
    5月 18 18:18:55 thinkman kernel: [<ffffffff81458cf2>] sock_close+0x12/0x20
    5月 18 18:18:55 thinkman kernel: [<ffffffff811da04f>] __fput+0x9f/0x200
    5月 18 18:18:55 thinkman kernel: [<ffffffff811da1fe>] ____fput+0xe/0x10
    5月 18 18:18:55 thinkman kernel: [<ffffffff810917b4>] task_work_run+0xd4/0xf0
    5月 18 18:18:55 thinkman kernel: [<ffffffff81077683>] do_exit+0x3b3/0xbb0
    5月 18 18:18:55 thinkman kernel: [<ffffffff81077f0b>] do_group_exit+0x3b/0xb0
    5月 18 18:18:55 thinkman kernel: [<ffffffff81083966>] get_signal+0x246/0x670
    5月 18 18:18:55 thinkman kernel: [<ffffffff812c1c65>] ? kobject_put+0xc5/0x210
    5月 18 18:18:55 thinkman kernel: [<ffffffff810155a7>] do_signal+0x37/0x750
    5月 18 18:18:55 thinkman kernel: [<ffffffff811f9110>] ? mntput_no_expire+0x30/0x1d0
    5月 18 18:18:55 thinkman kernel: [<ffffffff811f92d4>] ? mntput+0x24/0x40
    5月 18 18:18:55 thinkman kernel: [<ffffffff811da0ed>] ? __fput+0x13d/0x200
    5月 18 18:18:55 thinkman kernel: [<ffffffff81015d20>] do_notify_resume+0x60/0x80
    5月 18 18:18:55 thinkman kernel: [<ffffffff81577763>] int_signal+0x12/0x17
    5月 18 18:18:55 thinkman kernel: Code: 89 df e8 15 ab f8 e0 f0 ff 4b 6c 74 3f 31 c0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 66 0f 1f 44 00 00 48 8
    5月 18 18:18:55 thinkman kernel: RIP [<ffffffffa04d293f>] pppoe_release+0x15f/0x1d0 [pppoe]
    5月 18 18:18:55 thinkman kernel: RSP <ffff8800a7a03be8>
    5月 18 18:18:55 thinkman kernel: CR2: 0000000000000418
    5月 18 18:18:55 thinkman kernel: ---[ end trace d82e11cf3d48de5d ]---
    5月 18 18:18:55 thinkman kernel: Fixing recursive fault but reboot is needed!
    5月 18 18:18:55 thinkman systemd[1]: Unmounted Temporary Directory.
    5月 18 18:18:55 thinkman systemd[1]: Unmounted /boot.
    5月 18 18:18:55 thinkman systemd[1]: Reached target Unmount All Filesystems.
    5月 18 18:18:55 thinkman systemd[1]: Starting Unmount All Filesystems.
    5月 18 18:18:55 thinkman systemd[1]: Stopped target Local File Systems (Pre).
    5月 18 18:18:55 thinkman systemd[1]: Stopping Local File Systems (Pre).
    5月 18 18:18:55 thinkman systemd[1]: Stopped Create Static Device Nodes in /dev.
    5月 18 18:18:55 thinkman systemd[1]: Stopping Create Static Device Nodes in /dev...
    5月 18 18:18:55 thinkman systemd[1]: Stopped Remount Root and Kernel File Systems.
    5月 18 18:18:55 thinkman systemd[1]: Stopping Remount Root and Kernel File Systems...
    5月 18 18:18:55 thinkman systemd[1]: Reached target Shutdown.
    5月 18 18:18:55 thinkman systemd[1]: Starting Shutdown.
    5月 18 18:18:55 thinkman systemd[1]: Reached target Final Step.
    5月 18 18:18:55 thinkman systemd[1]: Starting Final Step.
    5月 18 18:18:55 thinkman systemd[1]: Starting Power-Off...
    5月 18 18:18:55 thinkman systemd[1]: Shutting down.
    5月 18 18:18:55 thinkman systemd-shutdown[1]: Sending SIGTERM to remaining processes...
    5月 18 18:18:55 thinkman systemd-journal[138]: Journal stopped

    Head_on_a_Stick wrote:
    https://bbs.archlinux.org/viewtopic.php?id=189808 (different error though)
    Could be a memory error -- run a memtest.
    cxh116 wrote:5月 18 18:18:55 thinkman kernel: Fixing recursive fault but reboot is needed!
    Does it reboot successfully?
    Also, you really need to read this:
    http://www.catb.org/esr/faqs/smart-questions.html
    reboot is success.
    use pppoe,switch to wifi, has this issue.
    hardware: thnkpad e450c 20EH0001CD
    $lspci -nn
    00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 0b)
    00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b)
    00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
    00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)
    00:16.0 Communication controller [0780]: Intel Corporation 8 Series HECI #0 [8086:9c3a] (rev 04)
    00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I218-V [8086:1559] (rev 04)
    00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)
    00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 1 [8086:9c10] (rev e4)
    00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 3 [8086:9c14] (rev e4)
    00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 5 [8086:9c18] (rev e4)
    00:1c.5 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 6 [8086:9c1a] (rev e4)
    00:1d.0 USB controller [0c03]: Intel Corporation 8 Series USB EHCI #1 [8086:9c26] (rev 04)
    00:1f.0 ISA bridge [0601]: Intel Corporation 8 Series LPC Controller [8086:9c43] (rev 04)
    00:1f.2 SATA controller [0106]: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] [8086:9c03] (rev 04)
    00:1f.3 SMBus [0c05]: Intel Corporation 8 Series SMBus Controller [8086:9c22] (rev 04)
    00:1f.6 Signal processing controller [1180]: Intel Corporation 8 Series Thermal [8086:9c24] (rev 04)
    04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
    05:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265] [1002:6900]
    06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader [10ec:5227] (rev 01)

  • Possible to create a second handle on a point without moving the first one?

    Hello again,
    Just had a question about something that often drives me crazy. Sometimes when I'm modifying an object (especially text that has been turned into outlines for logos etc) There are points on the path that I want/need to remove. Many of the times the points I'm removing had part of the curve that made the path look nice and smooth. For some reason Illustrator likes to create two points overlapping each other with a handle extending in opposite directions for each instead of one point with two handles...
    In the cases where I have a point on a path with only one handle, whether it overlaps another point or not, is there a way to create a new handle on the opposite side where a handle doesn't exist without moving the handle that is already there? I hate fiddling with the path for 10 minutes afterwards trying to get everything back into the same position again. I would like to be able to drag out a new handle while locking the old handle in place, but the initial behavior of the convert anchor point tool seems to be to get rid of the old existing handle and recreate two new handles which resets everything.
    Is there a way around this? A tool behavior option or maybe even a different tool that will let me just add the one handle to the point that is missing without moving or deleting the existing handle on that point? If it matters I'm using Illustrator CS5.5. Thanks for any help in advance!

    Thanks for the responses guys! Unless someone comes along with a completely native Illustrator solution I think the Pathscribe tool is what I'm looking for. The unify command in that other post sounds like just the thing for the randomd weirdness Illustrator does when you convert text to outlines etc. and I'll probably mostly use that method for the overlapping points that are created in those case. I would say close to 50% of the time though I need to add a handle to a point that isn't overlapping like where a letter shape curves on one side but is straigh on the other. I guess a good example of that would maybe tip of the "v" shape in stylized or script fonts, they often have a straigh side and curved side. Sometimes it's also me because I'll go with a more straight line concept for a portion of the letter shapes and then change my mind back again, by which time I have removed some of the handles that I want to put back. It sounds like VectorScribe will do exactly what I want the way I want it and save me a lot of time having to zoom way in to get the fine control I need to restore the paths orginial curve.
    All in all a pretty solid solution between the two. I'll have to pick up VectorScribe and will use unify where applicable. I don't understand though why this isn't something that Adobe hasn't made a native provisioin for? Seems there would be many times while making a design that you might want to change your mind without having to completely redraw the entirety of a curve, especially if you're doing an illustration from scratch. I thought there had to be a native solution and I was just somehow missing it completely... maybe they don't want to step on the 3rd party vendor's toes who have made plug-ins to deal with this sort of thing? Illustrator has been around a looong time now, seems like they would have come across this more than a few times... maybe I'm just not creating illustrations using the "proper" methods.

  • Creating Power point presentations from LabVIEW

    I need to create a microsoft power point presentation from LabVIEW. Has any one worked with power point from labVIEW.

    Yes I have done PP in LV.
    Quick suggestions to start.
    1) Use activeX. Provided you do not try to use the events from PP you should be able to do most of what PP offers.
    2) Before starting, make sure you have "help for VBA" installed. This can be isntalled from the MS source disks and doing a custom install. Without this, you will have no clue as to where to find things.
    3) Check for VBA examples of what you are trying to do.
    I have never composed a PP presenstation via LV. Check the VBA help to see if this is possible.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.

    I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.
    I am using Labview 8 ... I  need to develop a software to accquire the ECG data (simulated enironment ) and compute the time domain parameters of Heart rate variability like "SDNN, SDANN...etc". Can some 1 plllzzzz help me out.Plzz help me if u can.Thanx in advance.

    Hi Andy,
      Thanx for responding.  The input is from a text file. SDNN, SDANN,etc are  the timedomain parameters of heart rate variability.
     SDNN: the standard deviation of the NN or RR interval  i.e. the square root of variance.
    SDANN:the standard deviation of the averageNN interval calculated over short periods, usually 5 min,which is an estimate of the changes in heart rate due tocycles longer than 5 min
    SDNN index, the meanof the 5-min standard deviation of the NN intervalcalculated over 24 h,
     RMSSD: the square root ofthe mean squared differences of successive NN intervals
    NN50: the number of interval differences of successiveNN intervals greater than 50 ms, and
    pNN50 the proportionderived by dividing NN50 by the total numberof NN intervals.
    The problem is dat I am a fresher to the world of Labview. I have jus recently started working on it. Can u please suggest me some some idea as soon as possible.
      As i said  I have the ECG data in the form of text files..I need to create sort of GUI to calculate the time domain parmeters....I need help urgently. Plzzz help me if u can. If u have and .vi example to calculate the RR interval plzz send it to me ASAP.
    Thanku

  • Error codes for shared variables in Labview 8.5?

    I am trying to use Shared Variables in Labview 8.5 to enable real-time loops (similar to some of the examples in "Using the LabVIEW Shared Variable", published Aug 28, 2007).  I created it to hold the result of a 16-channel A/D converter (so a 16-element I16 array).  To avoid losing samples, I used buffering, with a buffer of 5.  To test this, I made a pair of VIs, one a producer that stuffs a 16-element I16 array into the shared variable "every so often" (controlled by a timed loop), and a consumer loop that reads the shared variable and does something with the data.
    If I think of the buffered shared variable as a Real Time FIFO (as the article suggests it is), I was curious how I would know (a) when the queue was empty, and (b) if the queue had overflowed.  Both are necessary if this is to be a practical means of exchanging data -- you want the producer and consumer to run more-or-less at the same rate, but only the producer is deterministic.  The consumer needs to be able to run "faster" if it falls behind (for example, because it is writing data to disk), but you don't want it to read data from the shared variable if there's nothing there.  [One can always read a shared variable, after all -- as the article states, it simply "holds" the last value written to it].
    Snooping around, I discovered that there are "error codes" associated with the shared variable.  In particular, a code of -2220 (FFFFF754) seems to signify an empty queue (or a shared variable that has not yet been written to), while a code of -1950678981 (8BBB003B) appears to be "buffer overflow".
    Is this documented anywhere?  Are there other "error codes" that would be helpful to know?  Is there some rationale to these seemingly-random numbers?  [It would help to develop code to utilize shared variables if there was a bit less "magic" and "mystery" involved].
    For what it is worth, with a buffer of size 40, I could generate 16 I16 values at 1 KHz (simulating sampling from a 16-channel A/D at 1 KHz) and pass it to a consumer node that (a) read from the shared variable until it was empty, then (b) "went to sleep" for 20 msec (simulating "doing something else non-deterministically"), and not miss any data (because I could then empty the Shared Variable RT-FIFO, which should have been half full, before it overflowed on me).  Not bad throughput -- I bet I could push it even higher.
    Bob Schor

    Hey Bob,
    The errors are documented in the LabVIEW help:
    Shared Variable Error Codes
    Real-Time Shared Variable Error Codes
    There are several error messages for buffer underflow/overflow depending on the settings of the network or RT FIFO buffers. In particular the -2220 and -2221 are useful for the producer/consumer use case. For example (as you probably know) the consumer can flush a variable using the error code (see the attached image).
    Gerardo
    Attachments:
    variable1.png ‏3 KB

  • Pro*C problems with static pointer variables

    I am having real trouble declaring a static pointer variable:
    static GVC_t *gvc = NULL;
    Pro*C/C++: Release 9.2.0.6.0 - Production on Fri Jun 22 13:08:40 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: /oracle/oracle9i/product/9.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 56, column 16, file GP_graph.pc:
    Error at line 56, column 16 in file GP_graph.pc
    static GVC_t *gvc = NULL;
    ...............1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "*" to continue.
    Error at line 0, column 0 in file GP_graph.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    make: *** [GP_graph.o] Error 1
    If I do not declare it static there is no problem:
    GVC_t *gvc;
    What can be the problem?

    I am having real trouble declaring a static pointer variable:
    static GVC_t *gvc = NULL;
    Pro*C/C++: Release 9.2.0.6.0 - Production on Fri Jun 22 13:08:40 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: /oracle/oracle9i/product/9.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 56, column 16, file GP_graph.pc:
    Error at line 56, column 16 in file GP_graph.pc
    static GVC_t *gvc = NULL;
    ...............1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "*" to continue.
    Error at line 0, column 0 in file GP_graph.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    make: *** [GP_graph.o] Error 1
    If I do not declare it static there is no problem:
    GVC_t *gvc;
    What can be the problem?

  • DISPLAY HANDLES AND SNAP POINTS

    I've drawn a box in Adobe Illustrator CC if I click the box I can see the corner and centre points of it, if I drag a ruler to snap to the centre handle the handle and snap points disappear - please help ASAP I need to snap to centres fast -  I have show boundaing box and edges on it still won't snap or display.

    Lesley,
    If you have Snap to Grid ticked what happens if you untick it?
    Can you use Smart Guides (they may be simpler to use for purposes like the one you describe)?

  • Calling DLL FMI Objects in Labview

    Hello,
             I am working with Functional Mock Up Interface between Modelica and Labview.
             I have made an FMI Program and now comes the tricky part of Porting it to Labview(We use RT Target with a PCIe6343 Device).
             The easiest and simplest direction i took was to convert this FMI program(written in C) into a DLL.
              Now this FMI program uses FMI objects and FMI functions for data handling.
             My first out of many questions is.
             1.Can i Call a Function specified in The DLL to create an Object in Labview.?
              2.How to get to creating an Object via a C DLL.
                 Regards
              Raghu

    Hi Raghu,
    you cannot directly access global variables that are declared in a DLL from LabVIEW or any other programming environment. The easiest solution for this is to add functions to your DLL which provide dedicated reading and writing access to those globals to external callers.
    Using C++ instead of LabVIEW will therefore not resolve this issue, as you still need to define data i/o functions inside the DLL to access the global variables.
    But before you start re-engineering your model DLL to include these functions, you might want to re-evaluate the concept of your mock-up interface. From my understanding, a FMU provides the simulation functionality only (give the model some inputs, wait for the calculation to finish, read back the outputs), which can be called through a standardized interface from a quite complex simulation framework. The framework provides data generation and storage, i/o with the simulation model, data visualization and logging. Although writing such a framework in LabVIEW is possible, I would not recommend doing so alone, as you will probably need several month just for concept design and programming.
    So from my point of view, the only sensible way to go would be to see if your existing simulation framework has an interface (ActiveX, .NET, OPC, TCP/IP low level, ...) that allows you to share data other programming environments. This way, you could implement the user interface in LabVIEW and send the user-changed parameters to the simulation framework, which then forwards them to the model. The model's outputs are then read back from the framework and will be passed to your LabVIEW application, which visualizes them for read-out...
    Best regards,
    Sebastian

  • How to pass data from a Delphi pascal DLL class to a LabView data cluster?

    Hi all,
    I have the following problem:
    I'm using a dll written in Delphi Pascal to transfer data to LabView using the "Call Library Function Node".
    My Delphi dll contains this class:
      TFlash=class
        Fi:TFileInfo;
        constructor Create;
        procedure LoadFi(Filedir_and_nametring);
      end;
     TFileInfo=record
        Idx:smallint; 
        IdxLstSpl:array[0..4] of longint;
        Ms:word;
        Sp:array[0..4]of word;
      end;
    I've created the TFileInfo record datastructure into a LabView cluster to have the "same" variable.
    My plan was to call a Deplhi DLL function with the "Call Library Function Node" and to pass the address of the TFileInfo record, so the data would be passed to the LabView Cluster.
    When I make a simple delphi dll function like this, it works because I only pass an small integer to Labview (without reference to the data structure):
    var  Data:TFlash; 
    function GetNrOfRows(FilePath: string):integer;stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath); //this function gets the number of rows out of the selected file.
      Result := Data.Fi.Idx;
    end;
    When I try to use this procedure instead of the function above, to pass the address of the whole complex data structure of "Data" (TFileInfo), I'm unable to get the information of "Data" into my Labview cluster:
    procedure LoadFileInfo(FilePath: string; DataPointer: Pointer);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath);
      DataPointer:=@Data;
    end;
    Call Library Function Node settings:
    - stdcall (WINAPI)
    - Run in UI Thread
    - Function prototype: void LoadFileInfo(PStr FilePath, void *DataPointer);
          * DataPointer --> Type: 'Adapt to Type' and Data format: 'Pointers to Handles'.
          * FilePath --> Type: 'string', string format: 'pascal string pointer'
    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.
    I've also read the following posts:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=229930&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=77947&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=51245&requireLogin=False
    (or did I miss something in these posts?)
    Hope my explanation is clear.
    Thx
    Solved!
    Go to Solution.

    Ok, I'm one step further:
    Because it works when passing an integer from the dll to Labview,
    I tried a simple vi containing a cluster with an small integer (16 bit signed Integer) in it and passing the pointer to that cluster:
    same settings:
    Call Library Function Node settings:
    - stdcall (WINAPI)
    - Run in UI Thread
    - Function prototype: void LoadFileInfo(PStr FilePath, void *DataPointer);
          * DataPointer --> Type: 'Adapt to Type' and Data format: 'Pointers to Handles'. (and the cluster wired to the output of the Call Library Function Node)
          * FilePath --> Type: 'string', string format: 'pascal string pointer'
    Changed the Delphi function to:
    procedure LoadFileInfo(FilePath: string; DataPointer: Pinteger);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath);  --> this function fills in the data in Data.Fi
      DataPointer^:=Data.Fi.Idx; --> write the smallint on the address given by Labview
    end;
    When I call my DLL this way, the expected value appears in smallint indicator in de cluster on the front panel.
    When I'm passing a pointer from the TFileInfo Type:
    Delphi:
    var  Data:TFlash;
    type  PtrTFileInfo = ^TFileinfo;
    procedure LoadFileInfo(FilePath: string; DataPointer: PtrTFileInfo);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(Copy(FilePath,2,length(FilePath)-1));
      DataPointer^:=Data.Fi;
    end;
    During debugging in my Delphi environment: when I get out of this function and pass this to Labview, an error occurs: access violation at 0x004E7125: read of address failed 0x00002A24. Process stopped.
    Is it actually possible to access data with 2 applications? Delphi--> common stack <--Labview

  • How to receive USB device handle from DLL

    Hi All,
    I'm working on a firmware
    running on a development kit and I'm trying to communicate with the
    board through USB from Labview in Windows environment. For that, I've
    built a DLL which enumerates, opens Read/Write file handle and does a
    few other functions. I'm using standard Windows APIs for USB
    initialization. 
    I use  "Call libr. function node" in labview to call these dll's. Inside the DLL, I use a function to initialize the USB which returns a device handle to the labview. My question is,  in "Call libr. function node" what is the parameter type I should use to receive the device handle? The device/file handle is defined in the WinAPI as a void pointer.
    Any help will be much appreciated.
    Thanks,
    Hari

    Hello Hari,
    Have you seen this thread?  DLL call with HANDLE type
    Regards,
    Charlie Piazza
    Staff Product Support Engineer, RF
    National Instruments

Maybe you are looking for

  • How do I install itunes with Windows 7?

    how do I install itunes with Windows 7?  I always get a Windows Installer error or administrator error __

  • Restored iphone 5 from back up of iphone 4 and it picked up wrong itunes account how do I change it?

    I Saved to itunes all data backed up from 4s and restored it to 5s on my PC which has 10 copies from other phones and it picked up stray itunes account how do I change it???

  • How to copy a JS variable to the clipboard

    I have a script that determines the distance between two guides. I would like that variable to be copied to the clipboard so that a user can enter it into the control panel if one wishes. The copy() function will only copy something that is selected

  • There is no Icloud tab on my safari

    Im not sure if I have the right version, but right now I have Safari 6.0.1. On Apples website, there is a Icloud tab in the new version of safari, but I do not have that tab on my screen. Anyone know what I need to do?

  • Workshop 8.1 startup problem

    I was working on a project in workshop lastnight and had to remove the application I was working on. Since then I cannot start workshop again. When I start it, it starts for a while then just crashes off. No error messages or anything. Just disappear