Page 1 of 1
GPIO activated capture
Posted: Mon May 20, 2024 5:23 pm
by ced
Hello,
I am building a linear mapping raman system based on open raman and I was wondering if there is a easy way to trigger the spectrum analyser acquisition using the Camera GPIO port? (This feature already work in spinview)
Re: GPIO activated capture
Posted: Tue May 21, 2024 7:02 am
by Luc
Not with the software as it is, you would have to modify the source code. At the moment, it forces the camera into Software Trigger mode everytime you connect to the camera as part of the initialization process.
However, there is a mechanism in the program to synchronize capture with other events. The interval.exe program demonstrates exactly that. If you control your linear stage from the computer, you can send a signal to the SpectrumAnalyzer program to acquire a spectrum and save it to the PC every time you position the stage at a given location.
Re: GPIO activated capture
Posted: Tue May 21, 2024 1:23 pm
by ced
Hi Luc,
Thanks' for your answer!
So all is needed is to edit out the software trigger mode in the main code? Or would the acquisition sequence need to be rewritten?
I try running interval program but it return a critical error: "Cannot find icon!" Not sure where this is coming from.
F5 keystroke seem simple enough! although the original idea was to get the instrument to control the acquisition.. I suppose I could emulate a keyboard
At least there is the option!
Re: GPIO activated capture
Posted: Wed May 22, 2024 10:08 am
by Luc
It's a bit more complicated because there is no mechanism inside the software to record spectra as they are triggered by the hardware. Changing the Trigger mode from Software to Hardware will block the acquisition until the trigger is received but you will have to start the acquisition process yourself and save the resulting data afterwards.
About the icon issue, here is a fix:
// set icon of program
try
{
this->m_iconSmall = ImportedIcon("%SystemRoot%\\system32\\accessibilitycpl.dll", 16, 339);
this->m_iconLarge = ImportedIcon("%SystemRoot%\\system32\\accessibilitycpl.dll", 48, 339);
SendMessage(getWindowHandle(), WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)this->m_iconSmall.getIcon());
SendMessage(getWindowHandle(), WM_SETICON, (WPARAM)ICON_BIG, (LPARAM)this->m_iconLarge.getIcon());
}
catch (...) {}
in virtual void init(void) I just added the try catch block.
I put the new program in attachment
Re: GPIO activated capture
Posted: Thu May 23, 2024 10:16 am
by ced
Hi Luc,
Thanks' for the explanation!
The amended Interval software work!
Have a great day!