Programming a Dual Core Controller

A dual-core controller operates slightly differently in order to take advantage of the extra performance provided by a multiple-core CPU. Consequently, there are some differences in programming a dual-core controller from programming a single-core controller. This page lists those differences.

Cached Data

A dual-core controller gains most of its performance by running PLCClosed"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events code and motion code at the same time. In order to avoid race conditions, function blocks that read motion data will report the data that the motion code used or calculated during the last cycle.

Calling Function Blocks Multiple Times in the Same Cycle

A given function block can usually be called multiple times without causing problems when using a single-core controller. For example, it is possible to call MC_MoveVelocity multiple times to start velocity moves on multiple axes. You would need to set the Execute input to False between every call to start a new velocity move. In doing so, you lose the ability to monitor the status of the velocity moves because you changed the axis parameter for each call, but if you were not concerned with monitoring the status of the velocity moves, you could call MC_MoveVelocity any number of times in a given cycle.

Function blocks that start a motion-related action need to avoid race conditions when using a dual-core controller. To do so the function blocks have to save argument data so that calculations and error detection can be determined during the next controller cycle. There are two consequences to this:

  • With the possible exception of the MulticoreFbExecuteDuplicateValueInCycle error (error 76), the Error and ErrorID outputs will report no error on the first cycle. The Error and ErrorID outputs will report their status on the next VM cycle.
  • The function block cannot be called with the same Execute state twice in a single VM cycle. If a function block is called with the same Execute state twice in a single VM cycle, a MulticoreFbExecuteDuplicateValueInCycle error (error 76) will be returned immediately.