Jump to content

hviewlabs

Members
  • Content Count

    70
  • Joined

  • Last visited

Community Reputation

0

About hviewlabs

  • Rank
    Very Active

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. More advanced state machine patterns: EDQSM: http://forums.lavag.org/index.php?s=&s...ost&p=19231 LabHSM: http://labhsm.com
  2. "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.
  3. 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?
  4. The node apparently uses GetValueByPointer function from the LabVIEW 8.5\resource\lvimptsl.dll. There other 2 functions there: SetLVRTModule and SetStrDefaultValue.
  5. 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 OpenComPor
  6. 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 archit
  7. 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 archit
  8. QUOTE(cosmin @ Nov 22 2007, 12:43 AM) 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?
  9. QUOTE(cosmin @ Nov 22 2007, 12:43 AM) 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?
  10. Maybe, pointer functions newly available in 8.5 (and DLL Wizard that uses them in wrappers) can help: http://forums.lavag.org/index.php?showtopi...ost&p=38888
  11. Maybe, pointer functions newly available in 8.5 (and DLL Wizard that uses them in wrappers) can help: http://forums.lavag.org/index.php?showtopi...ost&p=38888
  12. Maybe, pointer functions newly available in 8.5 can help: http://forums.lavag.org/index.php?showtopi...ost&p=38888
  13. 8.5 now has (exposes) means to work with pointers directly specifically to address the problems in interfacing with C dlls: http://forums.lavag.org/index.php?showtopi...ost&p=38888 These are inserted into wrapper VIs by DLL Wizard, so we can (are allowed) to use them too, I guess.
  14. 8.5 now has (exposes) means to work with pointers directly specifically to address the problems in interfacing with C dlls: http://forums.lavag.org/index.php?showtopi...ost&p=38888 These are inserted into wrapper VIs by DLL Wizard, so we can (are allowed) to use them too, I guess.
  15. 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 GetValu
×
×
  • Create New...

Important Information

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