Tip bias Pulse PowerScript Code

PowerScript

Tip Bias Pulse Applied in F/d Mode Code that can be used when you only want to apply bias over time. The time and bias values are set as variables.

main 0 files
Tip bias Pulse …..js
Tip bias Pulse …..js 943 bytes
var numPulse = 10; // num. of pulse
var durationHigh = 100; // ms 
var durationLow  = 50; // ms , minimum 50
var highValue = 2 // V
var lowValue = -1 // V
var delayTime = 2500// ms, pulse delay time


chan = ['zheight', 'Force', 'vertical (a-b)', 'timestamp', 'tipbias']  // channel setting
 
var cfd = {
	"highestPos": 2.0,
	"lowestPos": -3.0,
	"offset": 0,
	"upSpeed": 1.0,
	"downSpeed": 1.0,
	"forceLimit": 2,
	"holdTime": 0,
	"channels": chan,
	"useAutoOffset": true,
	"useForceLimit": true,
	"useForceCorr": false,
	"useSpeedSplit": false,
	"pixelsPerDir": 256
}

spm.spect.fd = cfd
spm.spect.trigger("fd","here");
spm.bias.tip = lowValue //start point(V)
spm.sleep(delayTime)
for (var i = 0; i< numPulse*2; i++){
	if (i%2 ===0){
		spm.bias.tip = lowValue;
		spm.sleep(durationLow);
	}
	else{
		spm.bias.tip = highValue;
		spm.sleep(durationHigh)
	}
	
}

spm.bias.tip = lowValue //finish point(V)
Comments (1)
alex_an
alex_an 1 month, 1 week ago

Nice work~

Snippet Information
Author: Jioh.Kwon
Language: PowerScript
Created: Oct 22, 2025
Updated: 0 minutes ago
Views: 36
Stars: 2