InoDrive / IO / setInputPolarity
InoDrive.IO.setInputPolarity()
Set the polarity of a specific input
Arguments:
• Target (Integer or String) Module’s Input Range (0 to 3) or ‘all
• State (String) Input Polarity State, NPN or PNP
Returns: Output Signal Changed (Boolean) { success: true } on Successfully setting input Polarity, or null
// Import InoDrive API Library import { InoDriveApiJS } from ( "ck-inodrive-api" ) // Instatiate the API let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false }) // Instantiate InoDrive Object Drive = await InoDriveApi.InoDrive({target:'Name', autoConnect:True}) // Take Control of the InoDrive Drive.SysControl.takeControl(true) // Set the Input Polarity Drive.IO.setInputPolarity(1,'NPN')