C-AFM current offset for NX Internal

PowerScript

Internal C-AFM for NX에서 최초 Current offset을 손으로 맞추기 번거로울 때 사용하면 편한 script입니다.

main 0 files
C-AFM current offset …..js
C-AFM current offset …..js 703 bytes
//Current offset for NX Internal Current Amp
var Current_Gain = 6	//Select Gain 10^6 or 10^9

var CurrentInitial = {
    "id": "park.nx.linear.dc",
    "nx": {
        "linear": {
            "preGainPower": Current_Gain,
            "postGainPower": 0,
            "currentOffset": 0
        }
    }
} 
spm.currentamp.config = CurrentInitial;
spm.sleep(200)
var Currentvalue = spm.readChannelAveraged('current', 20, 2)
var CurrentParams = {
    "id": "park.nx.linear.dc",
    "nx": {
       "linear": {
            "preGainPower": Current_Gain,
            "postGainPower": 0,
            "currentOffset": Currentvalue
        }
    }
} 
spm.currentamp.config = CurrentParams;
Comments (2)
alex_an
alex_an 2 weeks, 2 days ago

Nice work for current amp. control!

jungyu.lee
jungyu.lee 2 weeks, 2 days ago

The current amplifier tuning process has been nicely streamlined.

Snippet Information
Author: edward.park
Language: PowerScript
Created: Nov 13, 2025
Updated: 0 minutes ago
Views: 51
Stars: 2