Jump to content

FJ_Sanchez

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by FJ_Sanchez

  1. Hello,

     

    I am trying a very simple example using "Basic Level Trigger Detection.vi" and it is not working as expected.

     

    I want to get the first 3 rising edges (even without hysteresis) but I always get the first one. The help says that this VI internally stores the status (I have also check that in the code) but I see when debugging that it always returns 0 in the terminal where the history should be stored.

     

    I can workaround with my own VI or using subsets of the input signal, but is it a bug?

     

    Thank you.

    post-50325-0-27881100-1446119227.png

  2. Ok,

     

    few days ago a NI engineer tried to solve the problem comming to my office, but failed to find a solution. After some trial and error and some research I found the problem. I have to enable the Intel C-STATE technology in the BIOS settings under the CPU options. It looked like it was a problem related to energy and power states...

     

    Thank you anyway.

    • Like 1
  3. Hello,

     

    I've been struggling with this problem for months now... I want to use a cDAQ9171+NI-9234 with an Advantech PC (AIMB-580). I have 3 computers like this and all with the same problem. I plug the USB cDAQ-9171, Windows detect the device and loads the proper driver (cDAQ-9171), it is displayed in MAX but self-test or reset always fails with error. At the same time, NI Devive Loader service hangs up. If I try to restart or stop this service it cannot complete the operation, the only way to finish this operation is to unplug the usb cable from the PC, then the service restarts correctly. Additionally the windows' event logger shows the next error message:

     

     

    [nidevldu] Fatal: Fail to load device "cDAQ1" (cDAQ-9171) during batch 9.

    -50101 NI Platform Services: the requested resource does not exists or exists but is in a state which prevents its reservation. The operation could not be completed as specified.

     

    or

     

     

    [nidevldu] Fatal: Fail to load device "cDAQ1" (cDAQ-9171) during batch 8.

    -50808 NI Platform Services: a USB transfer failed. Due to a transaction reported by the USB host controller. This may be due to fault in the system's USB host controller, a USB cable, or a USB device.

     

    In one PC I re-installed Windows, installed DAQmx 14 and the problem was still there, this is with a Windows fresh-install... After this, I removed DAQmx 14 and installed DAQmx 9.8 (supplied in CD) and the it worked!!! I upgraded to DAQmx 9.9 and it was still working, so I stoped there as it was all I needed (9.8 has some bugs with NI-9234 that 9.9 solves).

     

    One thing to note, when it works, Windows first install cDAQ-9171 driver, but then inmediatly it changes to USB flash firmware updater, after this it returns again to load cDAQ-9171 and detects the NI-9134. When it don't work it only installs the cDAQ-9171 and doesn't load anything more...

     

    I tried in a second PC to repeat the process, but I have been not able to repeat the success, only the fail... I get the same error every time I plug the USB and I have not idea of what else try... I have disabled UAC, cleared the MAX data, reinstall windows 2 times, tried with DAQmx 9.8, 9.9 and 14. Forced USB flash firmware updater as Windows driver, changed BIOS settings (disable hyper-threading, VT extensions, USB legacy, etc.). I am almost sure that it is some kind of weird incompatibility or similar, the thing is that NI device loader always hangs-up. In the next days I'm going to try to copy the same exact configuration of BIOS from the working PC, just to be sure.

     

    Any recommendation?

  4. Hello,

     

    I'm developing an application that uses some PCIe hardware. My daily developing computer is a laptop docked to a dock station. Now, I would like to develop testing my subVIs in the remote desktop that has installed the PCIe hardware. I know I can enable remote debugging, compile and transfer the executable, then execute and connect from my laptop, but this is very inefficient and slow process to test subVIs.

     

    I could install the full development environment in the remote desktop, develop in this machine with remote connection (or even directly on this computer, as it's next to my laptop), but this is not the way I would like to work with every similar project.

     

    Do you have any better approach to debug remote desktop applications? I have heard something about using VI server and executing remote panels or similar, but I have never done such a thing.

     

    Any comment is welcomed.

    Thank you.

  5. LabVIEW is a fully managed environment. As such you do not have to worry about explicit memory deallocation if you are not calling into external code that allocates memory itself.

     

    You're not doing anything like that here, but use LabVIEW functions to create those buffers so LabVIEW is fully aware of them and will manage them automatically.

     

    There is one optimization though you can do. The Flatten to String function most likely serves no purpose at all. It's not clear what data type the constant 8 might have and if it is not an U8 it might even cause problems as the buffer that gets created is most likely bigger than what you need and the Plan7 function will therefore read more data from the datablock. This would in the best case cause performance degradation because more data needs to be transferred each time than is necessary and could cause possibly errors if the resulting read operation causes to go beyond the datablock limit.

     

    And if it is an unsigned 8bit integer constant, a Byte Array to String function would do the same but more performant and clear.

     

    I agree with you, I think that flatten to string is appending some useless information in this case.

     

    Thank you.

  6. Hello,

     

    I've been using Snap7 library for a while in the client role, so I can communicate with SIEMENS PLCs There is specific LabVIEW info here: http://snap7.sourceforge.net/labview.html

    I can successfully use the Cli VIs to read/write from PLCs DBs (a DB is just a memory block). For reading I pre-allocate a buffer, but I'm not sure if I'm doing it properly. My main concern is about memory leakage, I don't know if the memory will be freed after the VI exits or it will not be freed as long as the VI is in memory.

     

    Attached is what I have just now for reading. I define a typedef for each DB, it is a cluster of booleans, and reserve memory according to the number of booleans, but always in multiple of 8 (I read only bytes). I request the data with the CliDBRead and after that I make some conversions to return the data in a variant that I later cast to the proper typedef.

     

    Can you tell me if this is the best way to do this?

     

    Thank you!

    post-50325-0-21770900-1416303699_thumb.p

  7. Hello everyone,

     

    I have a front panel with a lot of indicators in different tabs (total about 100). I would like to know what is the best way to manage such huge amount of indicators... Usually I don't have so much, but in this case I have 5 tabs, so the amount of indicators in the VI gets high. After I've acquired data from the acquisition device, I should update most of them. My acquired/processed data is stored in an array. Any recommendations?

     

    Thank you!

  8. Hello,

     

    I have a project that I've modified in 2 different computers apparently with the same development environment (LV2013 SP1 + Database connectivity toolkit among others). When I moved the project from one computer to the other and closed the main VI (without any changes, just open and close) the "save files" dialog showed that some files from Database connectivity toolkit needed to be saved. I have a subvi calling "DB tools select data", if I remove this VI, labVIEW ask a last time to save or don't these files. If I dismiss any changes I can open and close the main VI and LV doesn't ask me to save anything.

     

    After this, I place again the "DB tools select data" in the SubVI, and then LV ask again to save some files from this toolkit.

     

    Can anyone tell me why is this happening? How can I avoid to modify any toolkit VI?

     

    Thank you!

  9. Hello,

     

    I'm trying to compile the code from this thread http://lavag.org/topic/9232-c-classes-from-lv/ and load it in LV. I can compile it without errors, but when I try to load the DLL in Lv using the Call Library Function Node, it throws an error: Error loading "mydll.dll" Invalid access to memory location.

     

    If I use the dll provided in the zip it works great, so I think that I should change something in Dev-C++ to make it compatible with LV Call Library Funcion Node.

     

    Any ideas?

  10. After some time trying still stuck with this, even NI support couldn't give me a solution, probably the COM object isn't fully ActiveX compliant or compatible with LabVIEW implementation of ActiveX... I'm going to make a wrapper DLL in C++ that handles the COM calls and pass data into LabVIEW, but I've never done it before and I'm struggling to make it work.

  11. Hello,

     

    I'm trying to use a library to interface some LVDT gauges from Marposs. It's implemented through COM objects and I have it working in Excel with VBA with this code:

     

    Private Sub CommandButton1_Click()Dim oSmaoMain As SMAO.SMaoMainDim clsInfo As SMAO.InfoDim sInfo As String'Initialize the SMAOMain ObjectSet oSmaoMain = New SMAO.SMaoMainoSmaoMain.Initialize'List all the Installed DriversFor i = 1 To oSmaoMain.DriversCount   sInfo = sInfo & "Driver Name : " & oSmaoMain.Driver(i) & " " & oSmaoMain.DriverDesc(i) & vbNewLineNextMsgBox sInfo, vbOKOnly, "Installed Drivers"'List all the Enabled DriversSet clsInfo = oSmaoMain.InfosInfo = ""For i = 1 To clsInfo.DriversCount   sInfo = sInfo & "Driver Name : " & clsInfo.Driver(i) & " " & clsInfo.DriverDesc(i) & vbNewLineNextMsgBox sInfo, vbOKOnly, "Enabled Drivers"Set clsInfo = NothingSet oSmaoMain = NothingEnd Sub

    When I port this code to LabVIEW I get answer from the SMAO.SMaoMain, correct initilization and even I can read the main objects properties. The problem comes when I try to access it's child object SMAO.SMaonMain.Info. When I get the reference and I make calls to the methods/properties, I get different results, always 0 drivers enabled.

     

    I've attached the LabVIEW code I'm using and some captures of the creatable objects I can see from LabVIEW.

     

    Any idea of what could be happening?

     

     

    post-50325-0-37873600-1390386768_thumb.p

    post-50325-0-98302700-1390386776.png

    post-50325-0-98969700-1390386778.png

    post-50325-0-11794200-1390386780.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.