-
Posts
53 -
Joined
-
Last visited
-
Days Won
1
JimPanse last won the day on November 12 2021
JimPanse had the most liked content!
LabVIEW Information
-
Version
LabVIEW 2013
-
Since
2004
Recent Profile Visitors
3,576 profile views
JimPanse's Achievements
-
Hello Rolf, thank you very much for your reply. Is there an example somewhere of how to create this wrapper DLL in C? Or could you briefly describe how the wrapper should be structured so that the event-based image acquisition can be output under LabView. Many thanks, Jim
-
Hello experts, I am trying to operate an SVS GigE camera using the SVGigE.x64.dll and the Call Library Function. So far everything seems to work. But how do you use the callback function to wait for the event each time an image is captured and then read out the image? SVGigE_RETURN __stdcall ImageCallback(Image_handle Image, void* Context) { unsigned char *buffer = Image_getDataPointer(Image); printf(“Callback: %08x\n”, buffer); return SVGigE_SUCCESS; SVGigE_RETURN __stdcall eventCallback(Event_handle EventId, void* Context) { int MessageID; SVGigE_SIGNAL_TYPE MessageType; Stream_getMessage((StreamingChannel_handle)Context, EventId, &MessageID, &MessageType); if (MessageType == SVGigE_SIGNAL_START_OF_TRANSFER) printf(“Event: SVGigE SIGNAL START OF TRANSFER\n”); return SVGigE_SUCCESS; } via the function call: result = StreamingChannel_create (&StreamingChannel, CameraClient, Camera, BufferCount, &ImageCallback, 0); can be integrated. Here I would have to pass the function pointer.... if I have understood it correctly. But how do I create this in LabView? In the Call Library Function there is an extra item Callbacks. Perhaps it can be realized with it. Unfortunately I can't find a good explanation. I would be very happy about your help. Have a good time. Jim Example from the camera manufacturer: #include <windows.h> #include "stdafx.h" #include "stdlib.h" #include "SVGigE.h" #include "conio.h" #include <string> // stream callback function will be registered when creating streaming channel //-------------------------------------------------------------------------------------------- SVGigE_RETURN __stdcall ImageCallback(Image_handle Image, void* Context) { unsigned char *buffer = Image_getDataPointer(Image); printf("Callback: %08x\n", buffer); return SVGigE_SUCCESS; } //event callback function to be registered for demonstrating a messaging channel's capabilities //-------------------------------------------------------------------------------------------- SVGigE_RETURN __stdcall eventCallback(Event_handle EventId, void* Context) { int MessageID; SVGigE_SIGNAL_TYPE MessageType; Stream_getMessage((StreamingChannel_handle)Context, EventId, &MessageID, &MessageType); if (MessageType == SVGigE_SIGNAL_START_OF_TRANSFER) printf("Event: SVGigE SIGNAL START OF TRANSFER\n"); return SVGigE_SUCCESS; } // -------------------------------------------------------------------------------- int _tmain(int argc, _TCHAR* argv[]) { printf("SVGigE-SDK Mini Sample\n"); printf("\n"); //--------------------------------------------------------------------- // Discovery //--------------------------------------------------------------------- CameraContainerClient_handle CameraClient; int Index = 0; Camera_handle Camera; CameraClient = CameraContainer_create(SVGigETL_TypeWinsock); CameraContainer_discovery(CameraClient); int NumCameras = CameraContainer_getNumberOfCameras(CameraClient); if(NumCameras < 1 ) { printf("no cameras found !!\n"); printf("Press any key to end.."); _getch(); return 0; } printf("Nbr of Cameras found: %-10d \n", NumCameras); // select the first discovered camera Camera = CameraContainer_getCamera(CameraClient, Index); std::string modelname = Camera_getModelName(Camera); printf ("Selected Camera: %s \n",modelname.c_str()); int SizeX, SizeY, ImageSize, PacketSize; SVGigE_RETURN result; result = Camera_openConnection(Camera, 3.0); if(result != SVGigE_SUCCESS) { printf("Open connection failed, is camera occupied ? is subnet mask OK ? \n"); printf("Press any key to end.."); _getch(); return -1; } Camera_getSizeX(Camera, &SizeX); Camera_getSizeY(Camera, &SizeY); Camera_getImageSize(Camera, &ImageSize); // Adjust camera to maximal possible packet size Camera_evaluateMaximalPacketSize(Camera, &PacketSize); printf("Sizex %d, Sizey %d\n", SizeX, SizeY); printf("PacketSize %d\n", PacketSize); //----------------------------------------------------------------------- int BufferCount = 3; StreamingChannel_handle StreamingChannel; result = StreamingChannel_create (&StreamingChannel, CameraClient, Camera, BufferCount, &ImageCallback, 0); //--------------------------------------------------------------------- // Create an event for demonstrating a messaging channel's capabilities //--------------------------------------------------------------------- Event_handle EventID; #define SIZE_FIFO 100 if( SVGigE_SUCCESS != Stream_createEvent(StreamingChannel,&EventID,SIZE_FIFO) ) { printf("Error creating Event\n"); } // Enable the 'Start-of-Transfer' in the messaging channel if( SVGigE_SUCCESS != Stream_addMessageType(StreamingChannel,EventID,SVGigE_SIGNAL_START_OF_TRANSFER) ) { printf("adding event failed \n"); Stream_closeEvent(StreamingChannel,EventID); } // Register a message callback for demonstrating a messaging channel's capabilities if(SVGigE_SUCCESS != Stream_registerEventCallback(StreamingChannel,EventID, &eventCallback, StreamingChannel) ) { Stream_closeEvent(StreamingChannel,EventID); printf("registering event failed\n"); } //--------------------------------------------------------------------- // do some camera configurations //--------------------------------------------------------------------- //------------------------------------------------------------------------ Camera_setAcquisitionMode(Camera, ACQUISITION_MODE_SOFTWARE_TRIGGER); float exposure = 50000; // 50 ms Camera_setExposureTime(Camera, exposure); float Gain = 3 ; // 3 db Camera_setGain(Camera, Gain); /* if the settings (binning mode, AOI, pixel depth, Flipping mode) have been changed after creating Streaming channel, a reopen of streaming channel is required: */ //--------------------------------------------------------------------- // start Acquisition: Software Trigger //--------------------------------------------------------------------- Camera_setAcquisitionControl(Camera, ACQUISITION_CONTROL_START); printf("\n"); printf("------------Start Acquisition-----\n"); printf("\n"); for(int i = 0; i < 10; i++) { printf("----------------------------------\n"); Camera_softwareTrigger(Camera); printf("Trigger %-10d \n", i); Sleep(1000); } Sleep(1000); printf("\n"); printf("----------End of Transfer---------\n"); printf("\n"); Sleep(1000); //--------------------------------------------------------------------- // close Camera and and unregister messages //--------------------------------------------------------------------- printf("Stop Acquisition...\n"); Camera_setAcquisitionControl(Camera, ACQUISITION_CONTROL_STOP); Sleep(1000); printf("Unregister messages...\n"); Stream_unregisterEventCallback(StreamingChannel, EventID, &eventCallback); Sleep(1000); printf("Delete streaming channel...\n"); StreamingChannel_delete(StreamingChannel); Sleep(1000); printf("Close connection...\n"); Camera_closeConnection(Camera); Sleep(1000); printf("Press any key to end..."); _getch(); return 0; }
-
No answer... Has anyone ever gotten the daqmx driver to work under Labview? Have a nice start of the week, Jim
-
Hello experts, I am trying to install the daqmx driver on Ubuntu as described here: https://www.ni.com/de-de/support/documentation/supplemental/18/downloading-and-installing-ni-driver-... apt-get install ni-daqmx The installation works smoothly. Unfortunately the VI's of the daqmx driver are not visible under Labview 2021SP1 after the installation. I am of the opinion that you should also install the package: apt-get install ni-daqmx-labview-2021-support to make the VI's visible under Labview. But this package is not included anymore. In former times there was this package. My question: How do I make the daqmx VI's visible under Labview? Greetings, Jim
-
Call Library Function Node / void** and void*
JimPanse replied to JimPanse's topic in Calling External Code
Hello Rolf, it looks like it's working. Thanks for your help, Jim -
Hello experts, I would like to use the two functions: int clSerialInit(unsigned long SerialIndex, void** SerialRefPtr); int clSerialClose(void* SerialRef); Execute via a Call Library Function Node. I have chosen the parameterisation shown. But it does not seem to work. The function prototype does not seem to be correct either. Can someone tell me how to parameterise the call library function Node in order to execute the two functions? Have a good time, Jim
-
I haven't yet found the "egg-cellent" in the area of real-time, vision and automation. A few years ago, I thought Labview RT based on Phar Lab was it. There is no RT Linux Labview for Desktop PCs. From my current point of view, a modified RT Linux is a possibility to realise these requirements. And I need the variety of hardware solutions that a desktop PC offers. The NI hardware is too limited and does not offer many possibilities. And with the NI software solutions, you don't know how long they will be supported. In your opinion, which development environment is best suited for such applications?
-
It's almost easier to say goodbye to Phar Lab and Labview Realtime and go for Linux RT (preempt_rt). The current RT Vision project will now run under Linux RT (preempt_rt). Does anyone have any idea what the roadmap of Labview for Linux is? 1-2 years ago an NI employee told me that an Imaq driver for Linux should be released in the near future. Nothing has happened yet either. Therefore, I have now switched from the expensive NI PCIe 1433 cards to EURESYS GRABLINK.
-
This device (purchased part) has only one USB connection which was realised with FTDI. There is no other interface on it. I don't think there is a Pharm Lab FTDI driver. Therefore, the question is, is there an RS232 to USB (FTDI) adapter with which the communication could work? Phar Lab can use RS232. Or is the approach just wrong?
-
It is a desktop PC running Phar Lab on it. I assume that there is no driver for USB FTDI converter under Phar Lab. Maybe I am wrong about this. So I thought I could use a RS232-USB converter (if there is such a converter) which then communicates with the USB-RS232 (FTDI) converter. RS232 communication works under Phar Lab.
-
Hello experts, I would like to communicate via Phar Lab with a USB device that uses an FTDI chip. Is this easily possible? Is there a RS232 to USB converter that can be used under Pharlab? A converter for a converter I would be very grateful for any suggestions. Greetings, Jim
-
Is there an official statement from NI how long Labview will be supported?
-
so, if you look at the share price. https://www.nasdaq.com/de/market-activity/stocks/nati you can see a nice separation there. until 2016, ni was reasonably solid and had a slow steady growth. in 2016 they decided to make everything more efficient and lived at the expense of their customers. at some point the customer notices the reduced performance and looks for an alternative. which is reflected in a share price decline since 2018..... a bold summary... this roughly reflects the correlation of the share price with my personal experience with ni.
-
I found the strategy of approx. 10-15 years better for my needs. if you continue to operate the current strategy like this, then I won't give labview much longer. that is the view from my field of application.... that might be enough for me until retirement. i would be interested to know how high the profit per employee of ni was 10-15 years ago and how it is now. then you could estimate whether it is a successful course or whether it is going down.
-
I also think that it is the strategic staff that is leading labview in the wrong direction. the concept of labview is certainly unique and has its justification. the strategic decisions are simply the wrong ones. the management should be fired and a few innovative engineers should be left to make the decisions. there are enough new technologies waiting to be implemented with labview.