1 minute read

can_set

Next Article
dnet_int_pm

dnet_int_pm

MACROPROGRAM FEATURES

can_set

The DeviceNet MacID and Baudrate are configured in the MacroProgram via the “can_set” instruction.

can_set arg1,arg2,arg3

arg1: DeviceNet ID MacroProgram Value Type: integer variable, integer constant. Value Ranges: 0-63, and -1

arg2: DeviceNet Baudrate in kbaud. MacroProgram Value Type: integer variable, integer constant. Value Ranges: 125,250,500, and -1

arg3: Protocol setting. MacroProgram Value Type: integer variable, integer constant. Value Ranges: 2 Note: values 0,1 are reserved for IIS CanBus protocol.

If arg1 and/or arg2 are set to -1 then that DeviceNet parameter may be set over the DeviceNet network. The DeltaMax may then be configured by a software tool such as DeviceNet Manager by Allen-Bradley. Once the parameter is configured it is stored in Nonvalitile memory so that it is remembered by the controller from one powerup to the next.

A can_set executed after a CanBus fault flag (flag# 129) will attempt to clear the fault and bus-off condition so that communications may continue.

A can_set instruction may reside within a begin_cfg and end_cfg instruction block so that once a MacroProgram is loaded, the DeltMax executes its DeviceNet Network Access State Machine. This allows for a DeltaMax to be online without having the MacroProgramming running.

IMPORTANT: The DeltaMax doesn’t attempt to access a DeviceNet Network until a can_set is executed with correct arguments.

This article is from: