News:

:) Remember, you need to be logged in to see posted attachments!

Main Menu

New Remote Server functions for imaging

Started by John Donovan, June 11, 2016, 08:39:30 AM

Previous topic - Next topic

John Donovan

Quote from: Dan R on March 06, 2025, 01:41:12 PMThanks John, so when we are collecting an image, our system is actually in 'analog scan' mode, so to modify your original VBA code above, we would need to:

' Remove faraday cup
Remote.RemoteFaraday 2

' CALL UNFREEZE
' SET DELAY AND WAIT


' Start the acquisition
Remote.RemoteImageStart

Once the image is acquired, we would set to deflect the beam and perform spot analyses:
Remote.RemoteImageSetBeamMode 2                          ' set to digital spot mode for JEOL 8200/8900/8500

and then we would start again in another location...

That should be fine, though I checked our code and see that we:

1. Set the beam conditions

2. Call Unfreeze

3. Remove Faraday

4. Acquire image
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Dan R

#16
Thanks so much John! The testRemoteImage.exe works great now so long as I:
1. Unblank Beam
2. Call Unfreeze
3. Wait ~5 sec
4. Collect image

No more weird partial scans!
-Dan

John Donovan

#17
Quote from: Dan R on March 07, 2025, 10:55:49 AMThanks so much John! The testRemoteImage.exe works great now so long as I:
1. Unblank Beam
2. Call Unfreeze
3. Wait ~5 sec
4. Collect image

No more weird partial scans!
-Dan

That's great to hear.  We also modified the TestRemoteImaging application code to show this "unfreeze" function call (see updated code in TestRemoteImaging.zip attached below):

' Set beam mode to analog or digital spot (comment out other line)
'Remote.RemoteImageSetBeamMode 1                           ' set to analog scan mode for SX100 mapping, SX100 video, JEOL EDS video, Bruker or Thermo imaging
Remote.RemoteImageSetBeamMode 2                           ' set to digital spot mode for JEOL 8200/8900/8500

' Remove faraday cup
Remote.RemoteFaraday 2

' Unfreeze JEOL 8230/8530 and iSP100/iHP200F video imaging if necessary (add additional delay if necessary)
If JEOLEOSInterfaceType& = 3 Then
Remote.RemoteImageUnfreeze
End If

' Start the acquisition
Remote.RemoteImageStart

Note in the TestRemoteImaging code above, there are two calls to Remote.RemoteImageSetBeamMode, but one of them is commented out.

This is because depending on the scan generator system, you will select either analog scan mode, or digital spot mode. See attached ZIP file for the complete code for this test app.

By the way, there is one caveat I should mention.  I was looking at the imaging code we use and noticed that the "unfreeze" call is made *before* the cup is removed and I was trying to understand why. Then I noticed a comment in our code, that in order to change the analog signal channel on these JEOL 8230/8530 instruments using EDS video imaging, say from SE to BSE, one must perform analog signal channel selection *after* unfreezing the JEOL video system.

So, in our code we set the beam conditions (Kev, etc.),  unfreeze, then set the signal channel, then all the other scan modes, etc.  Here's the code we use:

' Dimension byte array
If ImageIx% = 0 Or ImageIy% = 0 Then GoTo DigitizeImageStartZeroSize

' Get current positions
Call RealTimeGetAllPositions(Int(1))    ' update motors only
If ierror Then Exit Sub

' Starting acquisition, set conditions (if running automation)
If AcquisitionOnAutomate Then
Screen.MousePointer = vbHourglass
Call IOStatusAuto(vbNullString)
If imageconditionset = False Then
If DefaultColumnConditionMethod = 0 Then
Call IOStatusImage("Setting imaging kilovolts...")
Else
Call IOStatusImage("Setting imaging column condition...")
End If
DoEvents

' If using automated imaging, set conditions (store EDS variable and reset so EDS/Light condition is not changed)
itemp% = EDSThinWindowPresent
EDSThinWindowPresent = False
Screen.MousePointer = vbHourglass
If Not DigitizeImageSkipBeamModes Then      ' set true in procedure DigitizeImageAutomate
Call RealTimeSetConditions(DefaultTakeOff!, DefaultKiloVolts!, DefaultBeamCurrent!, DefaultBeamSize!, DefaultColumnConditionMethod%, DefaultColumnConditionString$)
End If
Screen.MousePointer = vbDefault
EDSThinWindowPresent = itemp%
If ierror Then Exit Sub

imageconditionset = True
End If
End If

' If JEOL 8230/8530 or iSP100/iHP200F always unfreeze before image acquisition (regardless of imaging interface type)
Call RealTimeUnfreeze       ' need to do this *before* setting image channel (RealTimeImageSetImageMode)
If ierror Then Exit Sub

' Make sure displayed mag is loaded
DefaultMagnificationImaging! = (FormIMAGE.TextMagnification.Text)        ' added 03-23-2016 in case UseDoNotSetConditionsFlag or DigitizeImageSkipBeamModes is set (Seward)

' If not skipping set beam mode or using automated imaging, set beam modes (see AutomateAcquireImageSetConditions for using digitized conditions)
If Not DigitizeImageSkipBeamModes Or (AcquisitionOnAutomate And Not UsePositionSampleMagKeVForAutomatedImaging) Then

' Set image mode (analog signal source)
Call RealTimeImageSetImageMode(ImageChannelNumber%)                      ' need to "unfreeze" JEOL 8230/8530 instrument first for video acquisition!!!
If ierror Then Exit Sub

' Set beam mode for analog signal imaging (need to set analog signal source *before* setting beam mode for JEOL, see RealTimeImageSetImageMode call above)
Call RealTimeImageSetBeamModeImaging
If ierror Then Exit Sub

' Set the mag to currently displayed (or position sample) magnification
Call IOStatusImage("Setting imaging magnification to " & Str$(DefaultMagnificationImaging!) & "...")
If DebugMode Then Call IOWriteLog("DigitizeImageStart: setting imaging magnification to " & Str$(DefaultMagnificationImaging!) & "...")
DoEvents
Call RealTimeSetMagnification(DefaultMagnificationImaging!)
If ierror Then Exit Sub

If DebugMode Then Call IOWriteLog("DigitizeImageStart: waiting " & Format$(AutomatedImageAcquisitionMagChangeMilliSecDelay&) & " msec after setting magnification...")
Call Sleep(AutomatedImageAcquisitionMagChangeMilliSecDelay&)

' Get the current beam size
Call RealTimeGetBeamSize(tbeamsize!)
If ierror Then Exit Sub

' Make sure beam is focussed (if using automated image acquisition or the beamsize is *not* zero)
If AcquisitionOnAutomate Or tbeamsize! <> 0# Then
Call IOStatusAuto("Setting zero beam size before image acquisition...")
Call RealTimeSetBeamSize(CSng(0#))        ' force beam size to zero
If ierror Then Exit Sub
End If

' Use current imaging magnification if not setting beam conditions or not using automated image acquisition
Else
DefaultMagnification! = DefaultMagnificationImaging!    ' need to set global for beam deflection calibration in RealTimeImageBeamDeflection()
End If

' Send scan rotation if present (get scan rotation based on current keV and mag)
If ScanRotationPresent Then
tfov! = RealTimeGetBeamScanCalibration!(XMotor%, DefaultKiloVolts!, DefaultMagnification!, DefaultScanRotation!)
If ierror Then Exit Sub
Call IOStatusImage("Setting scan rotation to " & Str$(DefaultScanRotation!) & "...")
DoEvents
Call RealTimeSetColumnParameters(Int(7), tCondenserCoarse&, tCondenserFine&, tObjectiveCoarse#, tObjectiveFine#, tAstigmation1&, tAstigmation2&, DefaultScanRotation!, tmagnification!)
If ierror Then Exit Sub
End If

' Remove faraday
Call RealTimeGetFaradayState    ' check faraday state
If ierror Then Exit Sub
If Not BeamOnFlag Then
Call RealTimeFaraday(Int(2))
If ierror Then Exit Sub
End If

' Clear Acquire beam deflection
Call AcquireUpdateSampleProgressUnLoad
If ierror Then Exit Sub

' Deal with optical lamp modes if automated image acquisition
If AcquisitionOnAutomate Then
If MiscIsInstrumentStage("CAMECA") Or (MiscIsInstrumentStage("JEOL") And JeolEOSInterfaceType& <> 2) Then       ' this sequence causes corruption of TCP/IP stack on JEOL 8900
Call IOStatusImage("Setting optical modes for automated electron imaging...")
If TransmittedLightPresent Then
If DebugMode Then Call IOStatusImage("Checking for light mode (reflected vs. transmitted)...")
Call RealTimeGetLightMode(mode%)                    ' check if in transmitted light mode
If ierror Then Exit Sub
If mode% = 1 Then
If DebugMode Then Call IOStatusImage("Setting light mode to reflected...")
Call RealTimeSetLightMode(Int(0))                   ' set to reflected light if in transmitted light
If ierror Then Exit Sub
End If
End If
If DebugMode Then Call IOStatusImage("Checking if reflected light is on...")
Call RealTimeGetReflectedLightMode(mode%)           ' check if reflected light is on
If ierror Then Exit Sub
If mode% = 1 Then                                   ' if reflected light is on, turn off
If DebugMode Then Call IOStatusImage("Turning reflected light is off...")
Call RealTimeSetReflectedLightMode(Int(0))
If ierror Then Exit Sub
If DebugMode Then Call IOStatusImage("Waiting for reflected light off...")
Call MiscDelay6(FormMAIN.StatusBarAuto, "reflected light off...", CDbl(1#), Now)      ' wait 1 second for light fully off (without DoEvents)
If ierror Then Exit Sub
End If
End If
End If

Call IOStatusAuto("Starting image acquisition...")
Call IOStatusImage("Starting image acquisition...")

' Start image acquisition
Call RealTimeImageStart
If ierror Then Exit Sub
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Dan R

Quote from: John Donovan on March 05, 2025, 07:09:36 AMThe new iHP200F instrument uses a completely different (JEOL) EDS and video imaging interface. We've implemented the EDS calls, but not the video imaging yet, but we hope to implement the MEC video imaging at some point.

Right now people who have an iSP100/iHP200F instrument and want to do analog signal imaging in Probe for EPMA (or Remote), must use the JEOL mapping interface, which is as you, know a bit slow as the minimum dwell time is 0.1 millisec (100 microsec) per pixel for the mapping call.

Yes, the Thermo EDS imaging was a great solution and is no longer available for EPMA instruments, but if I were you I'd buy a Bruker EDS with your new instrument. Then you get a great EDS detector and imaging system.

For one thing, we've already interfaced Probe for EPMA to the Bruker imaging system. Second, you will have the ability to specify a frame time independently of the of the image size.  With the JEOL 8230/8530 and iSP100/iHP200F video imaging systems, the frame times are determined by the image size as seen here:

' 64x48    : 100 us
' 128x96  : 100 us
' 256x192  : 80 us
' 512x384  : 60 us
' 1024x768  : 33 us
' 2048x1536 : 33 us
' 4096x3072 : 33 us

So for a 64 x 48 or 128 x 96 video image, the pixel dwell time is the same as the WDS beam scan mapping call, but for larger images the dwell time drops to 1/3 the time of the mapping call which is limited to 100 us per pixel.

So bottom line, we haven't implemented the new MEC video imaging calls yet, but hope to at some point in time. Or you could buy a Bruker EDS and be able to specify the pixel dwell time and image size independently!  And it's already supported.

Hi John, is there any update or estimate on whether the new MEC imaging calls would be available for the iHP200F?
Thanks!
-Dan

John Donovan

Sorry, we have not got around to that yet.

One problem is that we've asked JEOL Japan to implement an option for specifying the video frame dwell time on the new MEC interface but they have not responded to that request.

In the older 8230/8530 video interface they tried to add a frame time option as we requested, but that modified function did not work properly, and when we described the problem they said that the 8230/8530 video interface was no longer being developed and to wait for the new iSP100/IHP200F MEC interface.  But when they released that interface, it (again) had no option for the frame time.

Since then we've been requesting that they implement a hardware connection with the Bruker EDS detector for integrated WDS and EDS spectrum imaging and we haven't wanted to distract them from this new project.

If I were you I'd buy a Bruker EDS detector.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Dan R

Thanks John, I will consider it but for now it looks like we will limp along with the mapping image acquisition mode. Please let me know when you have implemented at least the base functionality we have now for the 8530F using the new interface.
-Dan