Jump to content

hviewlabs

Members
  • Posts

    70
  • Joined

  • Last visited

Posts posted by hviewlabs

  1. "Preferred Exec System" is a standard (not even hidden) property of the "VI" VI Server class.

    1. Put a property node (located on the Application Control pallette) on the block diagram.

    2. Right-click on it and in the pop-up menu select: Select Class/VI Server/VI/VI.

    3. Left click on the "property" word on this property node (which is now for VI class). In the pop-up menu select: Execution/Preferred Exec System

    You don't need to wire the reference input. When not wired the calling VI is assumed to be the VI for which properties are set/read.

  2. As Rolf pointed out, if you use "LabVIEW" instead of "LabVIEW.exe" as the value for the "Library Name or Path" control in the Call Library Function dialog, then the code will work in the built app as well as in the development environment.

    Apparently, using "LabVIEW" there opens a way to a lot of LabVIEW functionality. However, except for the ones documented in the "Using External Code in LabVIEW" manual, where can we get the description/prototypes for those functions, I wonder?

  3. So, can 8.5 call the functions from the library like below or not (HRESULT=long)?

    typedef struct tagPoogleMsgS

    {

    BYTE deviceID;

    BYTE priority;

    BYTE protocolID;

    WORD payloadLen;

    BYTE *pPayload;

    } PoogleMsgS;

    __declspec(dllexport) HRESULT SendMessage(PoogleMsgS sMsg);

    __declspec(dllexport) HRESULT OpenUsbPort(void);

    __declspec(dllexport) HRESULT CheckUSB(void);

    __declspec(dllexport) HRESULT RemoveConnectionlessMsg(PoogleMsgS* pMsg);

    __declspec(dllexport) HRESULT RemoveMessage(PoogleMsgS* pMsg);

    __declspec(dllexport) HRESULT CheckCOM(void);

    __declspec(dllexport) HRESULT OpenComPort(int nCom, DWORD dwBaud);

    The DLL Wizard does claim it finished successfully, but for the SendMessage it creates a node where instead of one input for the structure separate inputs are created for all the individual components of the structure plus some "dummy_controls", and pPayload is just U32 passed by value!

  4. NI has a LabVIEW Modbus library:

    http://sine.ni.com/devzone/cda/epd/p/id/4756

    As you can see, people reported it had problems in 8 (and above?) but since the file name is currently ni_modbus8_2.exe, I would assume they have been corrected.

    As for the arcitecture, of course, I will not miss this chance to suggest mine:

    I found that if we keep separate notions for state, action, and event, think (and treat) the code in the cases of the consumer loop as actions rather than states, maintain separate queues for events and actions, not only it allows creating a more flexible and powerful architecture, but, most importantly, developing code on a higher level of abstraction (when in this state and this event happens I need to do this, this and this action and switch to that state). Please see the following for further discussion and a more advanced architecture:

    Despite the pattern discussed there doesn't support hierarchical states (for those implemented see labhsm.com) I found it much more powerful and flexible (yet producing uniformly looking and easily modifiable/maintainable code) than the more primitive producer consumer single queue QSM patterns.

  5. NI has a LabVIEW Modbus library:

    http://sine.ni.com/devzone/cda/epd/p/id/4756

    As you can see, people reported it had problems in 8 (and above?) but since the file name is currently ni_modbus8_2.exe, I would assume they have been corrected.

    As for the arcitecture, of course, I will not miss this chance to suggest mine:

    I found that if we keep separate notions for state, action, and event, think (and treat) the code in the cases of the consumer loop as actions rather than states, maintain separate queues for events and actions, not only it allows creating a more flexible and powerful architecture, but, most importantly, developing code on a higher level of abstraction (when in this state and this event happens I need to do this, this and this action and switch to that state). Please see the following for further discussion and a more advanced architecture:

    Despite the pattern discussed there doesn't support hierarchical states (for those implemented see labhsm.com) I found it much more powerful and flexible (yet producing uniformly looking and easily modifiable/maintainable code) than the more primitive producer consumer single queue QSM patterns.

  6. QUOTE(cosmin @ Nov 22 2007, 12:43 AM)

    I guess the PackType parameter is refering to the member aligment (how the structures are packed into memory, 1byte, 2, 4, 8 or 16 bytes).

    And the correct value is determined by what? Say, if we dereference the pointer to a location to which a dll function has written something and we have the definition of the data structure for that pointer in the .h file, how exactly do we choose the PackType? Does it depend on OS, language/compiler used to make the dll, some options set in the compiler?

  7. QUOTE(cosmin @ Nov 22 2007, 12:43 AM)

    I guess the PackType parameter is refering to the member aligment (how the structures are packed into memory, 1byte, 2, 4, 8 or 16 bytes).

    And the correct value is determined by what? Say, if we dereference the pointer to a location to which a dll function has written something and we have the definition of the data structure for that pointer in the .h file, how exactly do we choose the PackType? Does it depend on OS, language/compiler used to make the dll, some options set in the compiler?

  8. So, 8.5 can now handle (wrap) dll functions which

    require as parameters, say, a pointer to a structure,

    one of elements of which is a pointer to a variable

    length data. Great! For this purpose the following

    library is utilised by the DLL Import Wizard (that's

    how I discovred it): \vi.lib\Utility\importsl

    It has DSNewPtr.vi to create a pointer (and allocate

    memory I would assume), DSDisposePtr.vi to (you

    guessed!) dispose of the pointer (and deallocate

    memory), InitStr.vi to write data to the memory to

    which the pointer points and, the

    GetValueByPointer.xnode (located in the

    GetValueByPointer subfolder, can be dragged onto BD

    from explorer, just like a VI, but you can't even open

    its FP) to retreive the data from the memory location

    the pointer points to.

    No documentation though, even in the context help for

    those top level VIs. So, Anybody has any idea what

    PackType parameter of the GetValueByPointer.xnode is?

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    They apparently can be used to ensure that passing

    of (large) data is done by reference (only the pointer

    is passed around without moving/copying the data

    itself) not only betweeen LabVIEW code and dll code but also

    between any of your VI's as well.

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    Interesting: the default string for the InitStr.vi is

    "Import Shared Library Tool in Jupiter." I wonder what

    "Jupiter" is/was. My guess is it was the code name

    for one of the LabVIEW versions.

  9. So, 8.5 can now handle (wrap) dll functions which

    require as parameters, say, a pointer to a structure,

    one of elements of which is a pointer to a variable

    length data. Great! For this purpose the following

    library is utilised by the DLL Import Wizard (that's

    how I discovred it): \vi.lib\Utility\importsl

    It has DSNewPtr.vi to create a pointer (and allocate

    memory I would assume), DSDisposePtr.vi to (you

    guessed!) dispose of the pointer (and deallocate

    memory), InitStr.vi to write data to the memory to

    which the pointer points and, the

    GetValueByPointer.xnode (located in the

    GetValueByPointer subfolder, can be dragged onto BD

    from explorer, just like a VI, but you can't even open

    its FP) to retreive the data from the memory location

    the pointer points to.

    No documentation though, even in the context help for

    those top level VIs. So, Anybody has any idea what

    PackType parameter of the GetValueByPointer.xnode is?

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    They apparently can be used to ensure that passing

    of (large) data is done by reference (only the pointer

    is passed around without moving/copying the data

    itself) not only betweeen LV code and dll code but also

    between any of your VI's as well.

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    Interesting: the default string for the InitStr.vi is

    "Import Shared Library Tool in Jupiter." I wonder what

    "Jupiter" is/was. My guess is it was the code name

    for one of the LabVIEW versions.

  10. So, 8.5 can now handle (wrap) dll functions which

    require as parameters, say, a pointer to a structure,

    one of elements of which is a pointer to a variable

    length data. Great! For this purpose the following

    library is utilised by the DLL Import Wizard (that's

    how I discovred it): \vi.lib\Utility\importsl

    It has DSNewPtr.vi to create a pointer (and allocate

    memory I would assume), DSDisposePtr.vi to (you

    guessed!) dispose of the pointer (and deallocate

    memory), InitStr.vi to write data to the memory to

    which the pointer points and, the

    GetValueByPointer.xnode (located in the

    GetValueByPointer subfolder, can be dragged onto BD

    from explorer, just like a VI, but you can't even open

    its FP) to retreive the data from the memory location

    the pointer points to.

    No documentation though, even in the context help for

    those top level VIs. So, Anybody has any idea what

    PackType parameter of the GetValueByPointer.xnode is?

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    They apparently can be used to ensure that passing

    of (large) data is done by reference (only the pointer

    is passed around without moving/copying the data

    itself) not only betweeen LV code and dll code but also

    between any of your VI's as well.

    Well, what I said would be especially beneficial if on

    its output wire GetValueByPointer.xnode really has the

    reference to (address of) the data, not to a copy it

    creates.

    Interesting: the default string for the InitStr.vi is

    "Import Shared Library Tool in Jupiter." I wonder what

    "Jupiter" is/was. My guess is it was the code name

    for one of the LabVIEW versions.

  11. Unbeleivable! I got this crap as a LAVA personal message! :o

    Have anybody else got this too or it's only me who is so lucky? Michael, is there a way for these scammers/spammers to mass maile these or did they really have to manually register and then manually send it? In the latter case I hope it won't become much of a problem here.

    From Prinscar Sango......

    Avenue 16 Rue 13 Treichville Abidjan

    Ivory coast

    Email contact:(prinscarsango_web001@yahoo.fr) My Dearast One. Greetings to you, i hope this mail will find you well & healthy and i hope we can established a relationship since we are meeting for the first time,i have gone through a profile that speaks good of you and it interests me to contact you for an assistance to help me transfer the Sum of 2 .5 Million USA dollars my father deposited in a bank here in Cote d'Ivoire before he was assasinated. I like honesty,trust,love,truth,caring,& respect,i have all this qulities in me and i believe you have all this qualities too, that is why i decided to contact you for this transaction,ihope to read from you as soon as possible.so please kindly reply me through this email address ( prinscarsango_web001@yahoo.fr) for Ugrent Mail

    Thanks and hoping to hear from you soonest. Regards, Prinscar Sango...

  12. Please note that the latest version of my PMS Assistant has the private properties and methods of 7.1 and 8.0 hardcoded, so it doesn't depend on the ini settings and still allows you to select those properties and methods in LV 8.2 as well - I just checked this yesterday. Moreover, if you know (or somehow have figured out) private properties and methods new in 8.2 names (or old but not included in my lists) you can just type them in and see if LabVIEW accepts them!

  13. Thank you, everybody who tried to help!

    I am sorry if some links were inaccessible.

    Here is what happened yesterday:

    The valiant and brave effort by Sen. John Cornyn to

    bring the High Skilled Immigrant Interim Relief Act of

    2006 to a vote on the Senate floor has been stymied

    because of the stubborn opposition of a few

    anti-immigration senators. All of them had been

    finally convinced except senator Sessions from

    Alabama, who has blocked this measure.

    Highlights of the High-Skilled Immigrant Interim

    Relief Act of 2006

    * Recapture H-1B visas that have been already

    approved by Congress. Even though there is a limit on

    the number of H-1B visas that can be issued every

    year, Congress has in past years authorized a

    significant number of H-1B visas that have never been

    used. These unused H-1B visas are needed now, and

    should be made available immediately.

    * Assist EB Green Card Petitioners in America

    Stuck in the Backlogs. The final stage of the green

    card process provides green card applicants with the

    ability to live and work in the U.S. without needing

    to extend a temporary visa. Green card applicants

    waiting in line for a green card to become available

    should be given the option, in exchange for the

    payment of a supplemental fee of $500, of entering

    this last stage of the process rather than having to

    continually try to extend their temporary visas.

    * Exempt Certain High-Skilled Workers from the

    Green Card Cap. Highly-educated workers who have

    graduated from U.S. universities with an advanced

    degree should be able to work in the United States

    without being subject to green card backlogs. In

    addition, highly-educated workers who graduated abroad

    and who have earned master's degrees in shortage

    fields (like science, technology, engineering, or

    math) and who have been working in the U.S. for at

    least 3 years should be exempt from the green card

    limit.

    * Recapture Unused Green Cards. As it has with

    H-1Bs, Congress in the past has authorized a number of

    high-skilled green cards that have never been used.

    These are needed now and should be made available

    immediately to nurses and physical therapists.

    * Retain Student Talent in America. Retaining

    student talent educated in U.S. universities is

    critical to our competitiveness. By creating a new

    visa (F-4) for foreign students who have been accepted

    and plan to attend an accredited program to earn a

    U.S. master

×
×
  • Create New...

Important Information

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