int MSXExxxx__SinCosInitAndEnableCompareLogic ( xsd__unsignedLong  ulChannel,
xsd__double  dValue,
xsd__unsignedLong  ulValueFormat,
xsd__unsignedLong  ulMode,
xsd__unsignedLong  ulSynchroTrigger,
xsd__unsignedLong  ulOption01,
xsd__unsignedLong  ulOption02,
struct MSXExxxx__Response Response 
)

Initialise and enable a Sine/Cosine Compare Logic.

Parameters:
[in] ulChannel Channel selection (0 to MSXExxxx__SinCosGetNumberOfChannels - 1)
[in] dValue Compare value. Possible value depends on the variable ulValueFormat

  • If ulValueFormat is set to 0: 0 to 0xFFFFFFFF
  • If ulValueFormat is set to 1: Standardised value (Unit). The value cannot be negative
[in] ulValueFormat Format of the value dValue

  • 0: Raw value
  • 1: Standardised value. The result of the operation dValue * (ulResolution / dSignalPeriod) must be an integer
[in] ulMode Compare mode

  • 0: Simple mode. As soon as the counter value corresponds to the compare value (dValue), a trigger or synchro trigger is released.
  • 1: Modulo mode. When the counter value corresponds to the compare value (dValue) or a multiple of it, a trigger or synchro trigger is released. In that mode, the value dValue cannot be 0.
[in] ulSynchroTrigger Generate synchro trigger, which can be used to trigger another MSX-E system, when the compare trigger is released

  • 0: No
  • 1: Yes
[in] ulOption01 Reserved. Set it to 0
[in] ulOption02 Reserved. Set it to 0
[out] Response Response of the system

  • iReturnValue Function return code
    • 0: The remote function performed OK
    • -1: System error occurred
    • -2: The PLD is not working
    • -3: The ulChannel parameter is wrong
    • -4: The ulValueFormat parameter is wrong
    • -5: The ulMode parameter is wrong
    • -6: The ulSynchroTrigger parameter is wrong
    • -7: In Modulo mode, the parameter dValue cannot be 0
    • -8: The dValue parameter is wrong
    • -9: The current status is not correct. The selected Sine/Cosine channel is not initialised
    • -10: The current status is not correct. The selected Sine/Cosine channel Compare Logic has already been initialised. Please call the function MSXExxxx__SinCosDisableAndReleaseCompareLogic
    • -100: Internal system error occurred. See value of syserrno
  • syserrno System error code (the value of the libc "errno" code)
Return values:
0 SOAP_OK
Others See SOAP error