Jump to content

zythum

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by zythum

  1. I my case, I done the CLA 2 years ago easily. But, after 2 fail CLAR, I'm giving it up.
  2. Just disable the "stop" button (not gray) and reactive-it when LED On
  3. Virtual Box is Free, run under Windows, Linux, Mac. Year ago, I know USB was not really efficace over VM. But, withing the last years, I use VMWare and share USB and RS232. Work fine.
  4. If you use a font where are caracter have the same spacing (like courier), you can determinate how many char into one line. Using the space before n char and replace space by \n
  5. thinking in LVOOP

  6. I don't know, but XControl is for customize control???
  7. In this case, the Win32 API work fine in LabView 2009 and 8.6. The speed is pretty close. Thank for the "patch". My only concern is for other function, it will be the same problem? Thank Shaun
  8. Hi, I have implement a part of code looking for the version of the executable (with .NET). With this information, I can check if the local exe is up to date versus the exe into network. But, this part of code is very slow if I include this into 2009, ran OK into 8.6. But, if I run those two exe into a computer with LV2009 developpement, the speed are pretty much the same! If I run those into computer with runtime 8.6 and/or 9.0, 8.6 is much faster! Any idea? Thank N.B. png is made form LabView2009 Snippet option example.zip
  9. Problem fix. Changing the Uint8 to Uint32 and changing the path from C:\Windows\System32\user32.dll ti user32.dll Thank
  10. Hi, On a setup, we using a touch screen. The LabView Software is running on full screen. I need to deactivage my front panel if the screensaver is on to prevent user start anyting. I use SystemParametersInfoA from user32.dll and this is working good, except, if I quit the software. "myexe a fin a error and need to close" (someting like that, my XP is in french). I don't have issues in debug mode, this error happen in exe mode. I use LV 8.6.1. Do you have any idea why? Thank you test.zip
  11. QUOTE (ACS @ May 8 2009, 06:04 PM) Just for let you know that user .net (using system.dll). So, this will not work under Linux or Mac.
  12. Hi, With LV 8.5.1, using "vi.lib\Utility\SMTP\smtpeml.llb\SMTP Email Send File Charset.vi", I try to send a JPG. I don't know why,but the image is ~ 25 ko, into the email, Outlook said is a ~ 50Ko and when I save is around ~ 100ko. But, the image is not good... If I do the sameting as BMP, image are ok (but around 950ko) Any idea? Thank
  13. QUOTE (manojba @ May 14 2009, 06:45 AM) If I remember corretlly, JKISoft toolkit offer to to someting like that
  14. QUOTE (bmoyer @ May 13 2009, 10:18 AM) Hi Bruce, Funny, because we are looking to the the same move (LV 7.1.1 to LV 8.5.1). Do you have the Vision toolkit install after LV 8? Do you have LV 7 and LV 8 into the same PC? Do you need vision into you app? If so, with version? We got some issues using LV 7 and LV 8 on the same PC, we install a virtual machine (VMWare ($$) or VirtualBox (Freeware)) to get a fresh Windows with LV 8 only. Be sure you install LV BEFORE any NI Drivers (like Vision, DAQ...) Hop this will help you Zythum
  15. QUOTE (rolfk @ May 11 2009, 07:48 AM) Thank you I think I will compile into a llb. So, I will able to open any VI from outside exe. Il will make a other interface for call the specified VI outside Production environement Thank again, fast answer!
  16. Hi, I read about do a dynamic call of a VI inside a exe into 7.1. That's working well. I try to do the same into 8.5, I can't. The reason I need that is because we have the MRP software for production (I just recompile it from LabView 6.0 to 7.1 and now into 8.5) that call the specified exe versus the step and setup in production. So the production need to call only the MRP and fallow the step. I don't really want to change the method because the code was done a long time ago from outside companies. Everything is working fine in 6.0. If I want to push for 8.5 upgrade, I need to redone the same way that was already done. I already talk to my LabView Architect's Instructor (I fallow the course last week) and he told me the exe on 6.0 and 7.1 was very close as a LLB. But, into 8.0 and up, the exe are different. I need to keep the exe aviable for engineering and r&d. I don't want two different way because if something work with one but not with the second, it will be software issues (my fault) This is a example what I try to do. Thank you Edit http://digital.ni.com/public.nsf/allkb/854...62571DA005B896C said we can't do anymore starting into 8.2 : There are two primary motivations for the change: Security and program design - EXEs are designed to be stand-alone programs, and DLLs dynamic modular code plugins. The users of EXEs and DLLs should generally be unaware of the details of the implementation. With an executable, users should only be aware of how to execute the program, and whether or not the executable implements certain access technologies like ActiveX or TCP/IP. For example, if you were to build an executable containing a VI designed to halt the program and shutdown your system, you would only want that VI called in specific times. You would not want other programs to access this VI and use it inappropriately. Microsoft Vista compatibility - Vista recommendations state that EXEs be signable and restrict their access from other programs. These requirements forced changes in the way the LabVIEW Application Builder creates executables and DLLs so that they could be digitally signed. This change forced a modification in the way the LLB was embedded in the LabVIEW EXE/DLL which prevents the LLB from being accessed from outside of the EXE/DLL.
  17. QUOTE (rolfk @ Apr 1 2009, 12:10 PM) Thank; I will try to do a dll for that
  18. QUOTE (rolfk @ Mar 31 2009, 06:08 PM) So, I need the reverse of "RegisterWindowMessage"? That's correct? If this is, may this could help http://groups.google.it/group/microsoft.pu...60bc4c43a844a37 ?Using GetClipboardFormatName as reported into "Community Content" on http://msdn.microsoft.com/en-us/library/ms644947(VS.85).aspx . RegisterWindowMessage is a alias of RegisterClipboardFormat
  19. QUOTE (rolfk @ Mar 29 2009, 03:21 AM) I found http://forums.ni.com/ni/board/message?boar...ding&page=2 about a RegisterWindowMessageA. May be a good start?
  20. Hi, I need to transfer information between a outside software and a LabView software. I take a look over http://forums.ni.com/ni/board/message?boar...=179626#M108830 about "Accessing shared memory location", but the documentation is not really present. I got a example in VB. But, I don't really understand how to preceded. I understand that I need to read a 2d array (320*240, 16bit) into memory (an image). But, I don't know how what to send to user32.dll / kernel32.dll Thank you for your advice "How it Works Thermalyze creates a named file mapping object and then maps a view of the file in its own virtual address space in order to write image data to a file that is stored in physical memory. Immediately after writing a new image to the file, Thermalyze sends a Windows message to the client program to notify the client program that a new image is available. If there are no processing delays, images are written at a maximum rate of 30 images per second. In order for a client program to read the image data from the file, the client must open the named file mapping object created by Thermalyze using the name “OptoThermFileMapObject” and then map a view of the file in its own virtual address space. In order to receive Windows messages indicating that a new image is available, the client must register the custom window message by the name “OptoThermNewImageReady”. The client must then subclass its top level window by replacing the window’s standard window procedure with a custom procedure so that the message can be detected. " File Mapping - Visual Basic 6 Example Code located in client application’s top-level form: '************************************************************************* Private Sub Form_Load() SetNewWindowProcedure hWnd GetMessageIdentifier End Sub Private Sub Form_Unload(Cancel As Integer) SetOldWindowProcedure hWnd UnmapAndCloseHandles End Sub '************************************************************************* Code located in client application’s module: 'constants used in API functions and subs '************************************************************************* 'sets a new address for the window procedure Private Const GWL_WNDPROC = -4 '320 columns x 240 rows x 2 bytes = 153600 bytes Private Const FILE_MAP_SIZE = 153600 Private Const FILE_MAP_NAME = "OptoThermFileMapObject" Private Const FILE_MAP_MESSAGE_NAME = "OptoThermNewImageReady" Private Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000 Private Const SECTION_QUERY As Long = &H1 Private Const SECTION_MAP_WRITE As Long = &H2 Private Const SECTION_MAP_READ As Long = &H4 Private Const SECTION_MAP_EXECUTE As Long = &H8 Private Const SECTION_EXTEND_SIZE As Long = &H10 Private Const SECTION_ALL_ACCESS As Long = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE Private Const FILE_MAP_ALL_ACCESS As Long = SECTION_ALL_ACCESS '************************************************************************* 'windows API functions and subs '************************************************************************* 'subclassing API functions Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long,ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long 'file mapping API functions Private Declare Function OpenFileMapping Lib "kernel32.dll" Alias "OpenFileMappingA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long Private Declare Function MapViewOfFile Lib "kernel32.dll" (ByVal hFileMappingObject As Long, ByVal dwDesiredAccess As Long, ByVal dwFileOffsetHigh As Long, ByVal dwFileOffsetLow As Long, ByVal dwNumberOfBytesToMap As Long) As Long Private Declare Function UnmapViewOfFile Lib "kernel32.dll" (ByRef lpBaseAddress As Any) As Long Private Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long 'API functions to aid with working with mapped file view Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Long, pSrc As Long, ByVal ByteLen As Long) Private Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Ptr() As Any) As Long Private Declare Function SafeArrayAccessData Lib "Oleaut32" (ByVal psa As Long, pvData As Long) As Long Private Declare Function SafeArrayUnaccessData Lib "Oleaut32" (ByVal psa As Long) As Long Private Declare Sub RtlMoveMemory2 Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByVal Source As Long, ByVal Length As Long) '************************************************************************* 'public variables '************************************************************************* Public g_OldWindowProcedureHandle As Long Public g_MessageIdentifier As Long '************************************************************************* 'private variables '************************************************************************* Private p_FileMapHandle As Long Private p_MapViewAddress As Long Private p_count As Long '************************************************************************* 'subclassing the main window 'a new windows procedure must be created to evaluate the windows messages 'that are sent to the window '************************************************************************* Public Sub SetNewWindowProcedure(ByVal windowHandle As Long) g_OldWindowProcedureHandle = SetWindowLong(windowHandle, GWL_WNDPROC, AddressOfNewWindowProcedure) End Sub Public Function NewWindowProcedure(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If (wMsg = g_MessageIdentifier) Then 'open the named file mapping object, map a view, and then process the new image ReadMapView Exit Function End If 'continue normal processing of messages. VERY IMPORTANT! NewWindowProcedure = CallWindowProc(g_OldWindowProcedureHandle, hWnd, wMsg, wParam, lParam) End Function Public Sub SetOldWindowProcedure(ByVal windowHandle As Long) SetWindowLong windowHandle, GWL_WNDPROC, g_OldWindowProcedureHandle End Sub '************************************************************************* 'get the custom message identifier '************************************************************************* Public Sub GetMessageIdentifier() g_MessageIdentifier = RegisterWindowMessage(FILE_MAP_MESSAGE_NAME) End Sub '************************************************************************* 'open the named file mapping object, map a view, and then process the new image '************************************************************************* Public Sub ReadMapView() Dim myIntegerArray(320, 240) As Integer Dim myVariantArray As Variant Dim safeArrayPointer As Long Dim arrayDataPointer As Long Dim returnValue As Long 'open file mapping and then map view of file If (p_FileMapHandle = 0) Then p_FileMapHandle = OpenFileMapping(FILE_MAP_ALL_ACCESS, False, FILE_MAP_NAME) If (p_FileMapHandle = 0) Then 'the file map has not been created yet Exit Sub Else p_MapViewAddress = MapViewOfFile(p_FileMapHandle, FILE_MAP_ALL_ACCESS, 0, 0, 0) End If End If If (p_MapViewAddress = 0) Then 'the map view could not be created Exit Sub End If 'SAFEARRAY 'Visual Basic stores arrays in a SAFEARRAY data type which, in addition to the array 'data includes information on the array size and dimensions. Accessing the data in a 'SAFEARRAY is most safely done by working with windows API functions 'set safeArrayPointer to the address of the SAFEARRAY 'if the array is an integer type CopyMemory safeArrayPointer, ByVal VarPtrArray(myIntegerArray()), 4 'if the array is a variant type, the address of the SAFEARRAY is 8 bytes after the 'address of the array ReDim myVariantArray(320, 240) As Integer CopyMemory safeArrayPointer, ByVal VarPtrArray(myVariantArray) + 8, 4 'set arrayDataPointer to the address off the array data returnValue = SafeArrayAccessData(safeArrayPointer, arrayDataPointer) 'move the data from the map view to the address in arrayDataPointer RtlMoveMemory2 ByVal arrayDataPointer, p_MapViewAddress, FILE_MAP_SIZE End Sub 'must unmap view and close handles Public Sub UnmapAndCloseHandles() If (UnmapViewOfFile(p_MapViewAddress) = 0) Then If (CloseHandle(p_FileMapHandle) <> 0) Then p_FileMapHandle = 0 End If End Sub '*************************************************************************
  21. QUOTE (zmarcoz @ Jan 24 2009, 12:09 AM) Under Windows XP, right click on "My Computer" (or using the hot key WindowsLogo+Break) go to Hardware, Device Manager and expend Port (COM & LPT). Then, 2 click on your LPT, go to resources and you will get the 4 address. Take the first. Be careful, this is 0x378, not 378. (0x378 is a standard on most computer) QUOTE (zmarcoz @ Jan 24 2009, 12:09 AM) <LI>The other one suggests to use VISA, I used VISA to control serial port. However, I have no clue how to use VISA to control a signal bit in parallel port. Me too, in more, I use LabView 6.1 (last week). I use "out port vi" and the docs that I found on NI web site. Sorry, I can't get you the address, ni.com is down for update. Hope this help you *** I think this was post on wrong forum....**** Zythum
  22. Assez spécial, n'est ce pas? I try to only hide (YScale.Marker.Visible = False) without turn them back on; same issues. The reason I want it is I will get the both axis with a different scale. Look like I made a mistake between marker and the grid. I just turn the grid color to transparent and now, it's fine. Thank you for your help.
  23. QUOTE (Rabbit @ Jan 15 2009, 11:47 AM) If you do a exe, the "stop" button will exit/quit? May want to add a version number (soft) Look good
×
×
  • Create New...

Important Information

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