Jump to content

osvaldo

Members
  • Posts

    46
  • Joined

  • Last visited

Posts posted by osvaldo

  1. Damn! You are right! :o
    When I create the new file I run 3 insert queries to set some default values in the tables. In the last of these queries the VI Finalize was missing and remained open! (damn copy and paste!:oops:)
    I was concentrating on closing the file when the problem occurred an hour before it was created!:(
     

    Thank you so much again!:thumbup1::beer_mug:

    Osvaldo

  2. Good evening everyone.

    I have a problem with SQLite file locks ...

    I created a datalogger in Labview that saves the data acquired from a customer's custom equipment in an SQLite database. I used Powell's library (an egregious library!)

    Although the capture is continuous, the data is not stored in a single SQLite file but on different files lasting about 1 hour each.

    At each time change the software closes the database currently in use (with SQLite Close) and create a new one. The database reference remains open all the time until it is closed at the next hour change.

    These SQLite files are downloaded from another application running on a second PC using FTP. (the machine running the data logger has a FileZilla server) What happens is that it is not possible to download any SQLite file created by the data logger until the application is stopped!

    By stopping the application and restarting it, you can download all the files created before the restart but not those created afterwards! It is as if a lock is maintained on all files created until the program is closed!

    I would expect the lock to be present on the file currently in use, but not on those already closed.

    Has anyone experienced this behavior before?

    Thanks for any help you can give me.

    Osvaldo

  3. Thanks for the reply
    Hmm ... Yes ... In fact it would seem that way ... would require that only the class can instantiate DVR relative to a subclass B derivative of it. The only pattern that comes to mind is the abstract factory, but not
    I see a use case that requires the option in question ...
    On the Internet I found no example where this approach was used.
    Maybe I'll understand the meaning if I happen a situation that makes clear the need for this setting. At the moment I'm just studying the object model of LabVIEW trying to bring him back to what we already know.
    Thank you
    Osvaldo

  4. Goodmorning everyone! :yes:

    We program in LabVIEW for a long time (fifteen years), but only recently have I been able to devote to learning OOP techniques with LabVIEW.
    I state that I have little experience in general with the OOP having in fact only a theoretical knowledge of the concepts and patterns and few experiments made in Pascal ... (eh ... eh ... :P )
    I come to you humbly ask for the meaning and use cases of the "Restrict references of descendant class type to member VIs of this class." In the tab on inheritance
    I could not connect this option with any of OOP concepts known to me.
    Thanks for your help. :worshippy:

    Osvaldo

  5. This is actually an interesting question as I would have thought that (nowdays) VIPM would install it's own version of OpenG Builder (possibly stored in the exe) and that it would have been worked on by JKI. I am just guessing tho?

    I do not know ... :unsure:

    During the process of packaging, VIPM freezes and I have to stop killing the process ... Curiously, however, remains open window of the VI OpenG Builder ... :blink:

  6. Hi Osvaldo

    As it is specific to VIPM it would probably be best retrying at the JKI forums rather than here to get a response.

    Thanks jgcode...

    I have cross-posted even there, but I thought that perhaps some of you might have encountered the same problem ... :frusty:

    However, I will follow your advice and try again even on the forums .. JKI :yes:

    Have a nice day

    Osvlado

  7. (cross-posted in http://forums.jki.net/topic/1324-recursive-vis-cannot-be-built-in-package/page__gopid__4548#entry4548)

    Hello to all, boys,

    I'm using VIPM ver 2011.0.1 (build 1692) dic 07/2011 Community Edition with OpenG Builder ver 3.0.1-2.

    I am trying to create a package to a library for LabVIEW 2011 that uses recursion native, but Package Builder gives me the same problem described by Kring to "Known Issue (Case 8006): VI Package build hangs in LabVIEW 2009 when recursive VIs included in package" and stated fixed from version 3.0 and later ...

    I think in my case the problem is that recursion is not "direct" ... Let me explain ...

    In my library there is the following sequence of calls: VI_A call VI_B that call VI_C that call VI_A!

    If I realize the simple recursion VI_A call VI_A, the Package Builder executes with success, but building my library, it fail waiting infinitely for the VI to load in memory... the same issue reported by Normandine... Even in may case, I have to kill the process.

    I do not know if Package Builder maintains a global list of calls, but I think the problem may reside in the test that checks for the sub-VI called the list of callers ...

    I'm sorry it could not provide a possible solution ... :-(

    Thank to all!

    Osvaldo

  8. Notifiers also share code with the queues. Notifiers are broadcast, so there are data copies when using them because there could be other listeners at any time (listeners are formally registered for user events but not for notifiers, so a copy of the data is always retained in the notifier when it is read by a Wait node). Notifiers are essentially queues bound to a single element and always accessed with Preview Queue. Notifiers also have some "history of this message" code to track whether or not a given Wait node has seen a particular message.

    Notifiers, because they make data copies, do have jitter on RT targets. But if you're not using them in a time critical loop, they do function just fine on RT targets.

    All refnum functions in LabVIEW are, and must be, thread safe. Just forking a wire creates thread contention issues, and all refnum types must assume that they will be used concurrently in multiple parallel sections of code.

    Ok!

    Thankyou!:worshippy:

    I use it like tag variables... I'm writing a library based on the idea of the NI CVT reference Library where the inner data storage based on Arrays where replaced on

    a number of dinamically created notifiers, one for each tag defined... My hope is that each reading/writing operation on notifiers is decoupled by each other, so that

    different loop can run in parallel so much as possible (the implementation of the original CVT reference library serialize all access on the AE that encapsulate the assary

    it self...)

    Ok... Ok... I could used the Shared Variables, but when the library development was started, no Shared Variable API was avaiable...

    Have a nice day!

    Osvaldo

  9. Speaking as the guy who wrote the queue primitives...

    The queues are meant to be the primary means of communicating data in LabVIEW between parallel chunks of code. They are completely thread safe, and they participate with LabVIEW's concurrency scheduling algorithms. They're designed to minimize both data copies and latency and have been stable for many years.

    User events go through queues that share most of the code with the general queues, although they have a bit more overhead since at any time there might be multiple listeners for an event, which can (not necessarily "will", just "can") cause more data copies. User events are data broadcasters, where as general queues are data point-to-point transmitters. The general queues thus have less overhead, but it is a very small amount less overhead.

    For me personally, I prefer the general queues instead of the user events only because of the arcane nodes and special terminals that are required to register dynamic user events. I use user events when I need to have code that sleeps on both UI events and data arrival. But it is really personal preference -- many programmers are successful using user events generally.

    Hi

    Very interesting! :thumbup1:

    So... speaking to the guy who writed the primitives... what about the Notifiers Primitives?

    I usually use them to send signal (like booleans to quits parallel While loops, o to send chuncks of data asynchronously to many consumers), but

    now I'm working on an library that will use them to broadcast data to parallel tasks (using named notifiers)...

    Any issues? On realtime targets?

    Thanks

    Bye!

    Osvaldo

  10. Hi mandya14,

    Sorry for bad English ... but not my mother tongue ...

    Let me understand...

    I guess you a while loop containing a VI (from your device driver toolkit) that returns the status of DIO and you set the value of this DIO directly into a boolean indicator through its terminal.

    On the other hand you have another while loop that contains an event structure with which you collect the event "value change" on the indicator whose value is set from the di DIO...

    I understand you correctly?

    If it is correct, your problem is that setting the value of an indicator in this way *does not* trigger any "Value Change" event!

    If instead of using an indicator you use a control (of course you should set its value though its local variable), then when the program writes the new boolean value, automatically would be triggered a "value change" event that you can catch with the event structure.

    Osvaldo

    p.s. The comparision would be done between the new value en the old one memorized in an shift register or using a feedback node...

  11. I am trying to trigger an event each time the boolean indicator changes states. The boolean indicator is connected to a digital DIO. Each time the state is changes from low to high i must read the data and each time it changes from high to low i want to read data as well. so on the state change i want to call the read function.

    can anyone help me out please? thank you:)

    Hi mandya14,

    i think that is impossible for an indicator to send an event at an event structure... Even in my last project a find that a numeric double indicator does not trigger any value change event...

    In my application the event would be sent when the I/O loop change the value via the Value (trigger) property...

    Even a control with the Disable property set to 1 or 2 is not able to trigger events!

    To solve the problem, i change the indicator with a control and than I put an rectangular trasparent decoration to mask the control itself...

    Or make a tiny loop that trigger the event whenever detect a change in the boolean value...

    Osvaldo

  12. I'm afraid the OLE Variants, which the Database Variants really are, do not map 1:1 to the LabVIEW type descriptor definitions so it is very likely that this is not possible. On the other hand the Database toolkit used to have support for parametrized updates and queries so there should be some way, but maybe that got discontinued in the later LabVIEW versions as it was a seldom used feature and likely a pain to support too.

    Ok! Thanks for all!

    Have a nice day!:yes:

    Osvaldo

  13. The difference is that the VT_I4 type is an OLE Variant type while the other is a LabVIEW Variant. The Variant to Data used to be able to convert both types but chocked on the VT_NULL Variant that could be returned. For that there was a Database Variant to Data function. It's possible that LabVIEW 8.6 or something changed this behavior so that you do need to explicitly use the Database Variant to Data function from the Database Toolkit palette for all Database Toolkit variants.

    Thanks!

    Can you retrieve the Type Descriptor of these OLE Variant Types using the Variant To Flattened String function?:frusty:

    I would like to directly convert a variant array in a given cluster type, as with the original LabView Variant to Data function do.

    I was unable to convert the array into a cluster directly using the Database Toolkit palette version function... it seems not to handle the aggregate types ...:angry:

    If it were possible to get the type with the type descriptor, I could dismantle the array and rebuild the cluster using the same technique used in OpenG toolkit ...

    Osvaldo

  14. Hi to all,

    I'm writing an application that use an MS Access database to store test report data...

    The queries to the database tables and colums are made using the NI Database toolkit.

    This library returns the data into 2D array of variants, so i've made a VI that try to convert this array (line by line aka record by record) into

    an 1D array of clusters representing one record each.

    To do this I'm using the "Variant to Data" node, passing the 1D array of variants as input and specifing the cluster as target type...

    Well... If I create the 1D array of variants assembling data from controls, the node successfully convert it into the cluster required...

    If I connect as input the 1D array returned by the Database toolkit, the output cluster results empty!

    Debbugging the code with probes, I've noted that the data types reported in the variants generated by the toolkit differs from the

    data types reported for the standard labview types!

    For example: A column defined as LONG (32 bit integer) in the database file, in the variant returned by the toolkit appear as VT_I4 instead of I32 or U32...

    Anyone know why this difference?

    There is a simple metod to automatically convert from the Toolkit type into the standar type variants?

    I've also try to use the "variant to flattened string" node, but seems that this node does not work whit this kind of variants...

    Thanks!

    Osvaldo

  15. Osvald, I am sure there is a more elegant way than what I am about to suggest but it has worked for me for viewing PDF files.

    Just create a web browser activex container and load the file to preview there. Let the browser decide that the correct application is to view the file (acrobat, other pdf viewer, excel, etc).

    Michael

    What idea!:thumbup1:

    Unfortunately, the method works only with files that Internet Explorer is able to show independently or as a plug-in...:throwpc:

    does not work with Excel spreadsheets, which instead are downlod and opened directly with Excel ...:angry:

    Among the activeX is also available ThumbCtl ... I tried it and I saw the preview that makes the files as shown in the File Explorer ... but excel is not made the preview ... only the icon!:frusty:

    Thanks for your help ... 'm open to any suggestions!:wacko:

    Hello

    Osvaldo

  16. Hi to you guy!

    I'm writing an application that collects data from a test machine and than creates a printed report based on an excel file template (xltx).

    I'm able to create the final excel file to print (i'm using the Office Report Toolkit to do that) or save.

    I let the user to select the template file on the fly, using the standard File Dialog Window and then run the VI that make the report...

    Now the problem I'm not able to solve... He had request to have a little preview of the file selected that help him to

    select the right template...

    He would have a dialog with a listbox populated with the files names, and a box on the right that show the preview of the file

    actualy selected in the listbox...:(

    I've tried a number of methods to achieve the goal with no results!:frusty:

    I've tried the PrintPreview ActivieX into an ActiveX container with no result!

    Using the Excel ActiveX in ActiveX container lat me show the file, but I can't find a zoom property!!

    Perhaps using the .NET container? I don't know how...

    HELP ME!!!:wacko:

    Anyone of you gurus knows a way to make that possible? :worshippy:

    Best regards

    Osvaldo

  17. QUOTE (David Wisti @ Jan 6 2009, 05:17 PM)

    There are some http://forums.lavag.org/Industrial-EtherNet-EtherNet-IP-t9041.html' target="_blank">VIs here on lava too that are more open then the NI ones. They are not OPC but communicate with the Ethernet IP protocol which is what most OPC servers would be using.

    Hi to all,

    Ok... I never used this VI libraries because they use the Ethernet interface and I needed to use an RS232 serial link... If you use the Ethernet interface module, probably you can use this libraries in more efficient way than the OPC interface...

    In my latest work, I used Siemens S7 PLC with Ethernet interface module and I communicate via TCP/IP Fetch/Write protocol without the need for an OPC server or other driver software...

    RSLinx is the only secure way to interact with AllenBradley PLC if you use the serial link or you want to use a generic method to connect to PLC tags via OPC (because RSLinx is the only official sw that implement the PLC protocol that I know)... than, to connect to tags you can use Datasocket or the OPC Server (that in facts are OPC clients) library from NI, or even Labview DSC...

    Osvaldo

  18. QUOTE (maroctrading @ Dec 19 2008, 02:10 AM)

    Hello forum,

    I'm Mounir from Morocco,it is my first debate in this forum,I have small worries at the level of the LabView and AllenBradley :

    -how to link OPC of AllenBradley with LabView with the intention of supervising such program in AllenBradley ? somebody represents stages me

    Hi,

    in order to communicate with AllenBradley PLC, you have to install their OPC server named RSLinx and setup it for the CPU you want to communicate with.

    Then, in RSLinx you can configure the tags representing the internal PLC variable you want to read/write from you labview program.

    When the tags are defined, you can access them or via Datasocket (using the OPC protocol... see the labview on line manual or search on NI web site) or

    by binding the controls on your front panel to the desired tag: to do that, open the properties window of the control/indicator and go to the page Data Binding... select Datasocket from the sources, set the access type (Read o Write or both) and select the source using the button on rigth side of the path control.

    The path is the same for the Datasocket API... Databinding is all automatic but Datasocket API give you more control over the communication.

    Refer to the on line help for detailed information... and search on the AllenBradley web site for RSLinx software and how to configure it.

    This is all my knowledge about.... sorry!

    Regards

    Osvaldo

  19. QUOTE (ned @ Aug 28 2008, 03:19 PM)

    Hi Ned,

    what about the Web Server shipped with the Internet Toolkit used instead of the G Web Server integrated into the LabView RunTime?

    If I well remember, this software was implemented in pure G and the CGI mechanism was achived using the dinamic call of CGI VIs via VI Server... considering some little issues on using it in compiled applications, why it should not run on RT targets?

    Osvaldo

  20. Hi Mike,

    To achieve this, you must set your application as the startup in the project.

    Open contextual menus using the right mouse button on the name that corresponds to your executable in Building Specification, and you will find an entry corresponding to Set as startup ... If setted, the application will restart automatically whenever the cRIO is switched on or reset!

    Osvaldo

    QUOTE (MeltingPlastic @ Apr 8 2008, 02:51 AM)

    Hey guys,

    I've been programming on a compact RIO 9012 for a while and basically have my code 100% at what i need to do. What i've noticed is if i run the VI from my computer(the VI is loaded on the FPGA) i can then disconnect my computer and have the RIO function as the code is programmed. But if i reboot the RIO the code does not start up(or is ereased from memory, not sure) How can i make it so that every time i turn on the compact rio, it runs the code even if there is no computer connected to the RIO

    -Mike

×
×
  • Create New...

Important Information

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