Quantcast

Trying to pulse a Coherent OBIS laser with TTL via NI PCI-6602

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trying to pulse a Coherent OBIS laser with TTL via NI PCI-6602

Andreas Karampatzakis
Dear all,

I am new to Micro-Manager and even more so to controlling hardware via scripting. I would appreciate your help with the following:

I am trying to have my laser output (Coherent OBIS) pulsed via a script. The laser is connected via a NI PCI-6602 card. I am able to pulse the laser directly via the NI-MAX interface, as well as via LabView, but I have no luck via Micro-Manager.

First things first, I am trying to just have the laser turned on via the script (in terms of pulsing, my end-goal is to have it turned on/off by changing its "state" in a loop).

The laser is connected on channel 'Dev 1/ctr0' and on terminal: '/Dev 1/PFI 36/'

I have added DigitalIO on my hardware config in Micro-Manager, which appears to be working properly as on the device property browser, I can see the options for DigitalIO. "OutputChannel" is set to "Dev 1/port0" and I manually set "TriggerInputLine" to "/Dev 1/PFI36".

"State" was 0, but I can manually change it to -1 (to fire all) or any other number. If I understand correctly, by setting to -1 the TTL should be fired and the laser should be on (according to https://micro-manager.org/wiki/National_Instruments) [note - my laser is set to digital operating mode, ie waiting for TTL to fire].

However, I cannot seem to turn the laser on at all no matter what state I set it to, even though I can toggle the state, with a (super-simplified) script as below:

core = mmc;  
core.unloadAllDevices();       
core.loadDevice("DigitalIO", "NI100X", "DigitalIO");
core.initializeDevice("DigitalIO");

for (int x = 0; x < 5; x++) {

mmc.setProperty("DigitalIO","State", -1);
gui.message("state = " + -1);
Thread.sleep(100);
mmc.setProperty("DigitalIO","State", 0);
Thread.sleep(100);
gui.message("state = " + 0);
}

Any help much appreciated,

Thanks in advance!



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to pulse a Coherent OBIS laser with TTL via NI PCI-6602

Austin
Have you confirmed the pin is outputting a 5v signal using a multimeter?


On Dec 30, 2016, at 12:51 AM, Andreas Karampatzakis <[hidden email]> wrote:

Dear all,

I am new to Micro-Manager and even more so to controlling hardware via scripting. I would appreciate your help with the following:

I am trying to have my laser output (Coherent OBIS) pulsed via a script. The laser is connected via a NI PCI-6602 card. I am able to pulse the laser directly via the NI-MAX interface, as well as via LabView, but I have no luck via Micro-Manager.

First things first, I am trying to just have the laser turned on via the script (in terms of pulsing, my end-goal is to have it turned on/off by changing its "state" in a loop).

The laser is connected on channel 'Dev 1/ctr0' and on terminal: '/Dev 1/PFI 36/'

I have added DigitalIO on my hardware config in Micro-Manager, which appears to be working properly as on the device property browser, I can see the options for DigitalIO. "OutputChannel" is set to "Dev 1/port0" and I manually set "TriggerInputLine" to "/Dev 1/PFI36".

"State" was 0, but I can manually change it to -1 (to fire all) or any other number. If I understand correctly, by setting to -1 the TTL should be fired and the laser should be on (according to https://micro-manager.org/wiki/National_Instruments) [note - my laser is set to digital operating mode, ie waiting for TTL to fire].

However, I cannot seem to turn the laser on at all no matter what state I set it to, even though I can toggle the state, with a (super-simplified) script as below:

core = mmc;  
core.unloadAllDevices();       
core.loadDevice("DigitalIO", "NI100X", "DigitalIO");
core.initializeDevice("DigitalIO");

for (int x = 0; x < 5; x++) {

mmc.setProperty("DigitalIO","State", -1);
gui.message("state = " + -1);
Thread.sleep(100);
mmc.setProperty("DigitalIO","State", 0);
Thread.sleep(100);
gui.message("state = " + 0);
}

Any help much appreciated,

Thanks in advance!


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Loading...