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 }) %(js-comment)_// Instantiate InoDrive Object_ let Drive = await InoDriveApi.InoDrive({ target: "Name", autoConnect: true }) // Take Control of the InoDrive await Drive.SysControl.takeControl(true) // Set Input 1’s Polarity to NPN await Drive.IO.setInputPolarity(1, 'NPN')