X20DO4322 Module constant true

I have a question that I can’t seem to figure out, even though it probably isn’t that difficult. I am trying to output a DO signal via CANBUS using the X20DO4322 module. The controller currently sends a 1 (true) every 1000 ms while a measurement is running on our controller.
However, the X20DO4322 module now switches from “true” to “false” and back again every second (auto-flashing). But I want the status to remain “true” until I send a “false” signal again. Is there a way to adjust the configuration of the X20DO4322 module so that it only changes the output when the signal rises/falls?

I’m looking forward to your replies.

BR

Hi Leo, and welcome to the Community!

I don’t think there’s a way to configure the module itself to do this; it will always set the output to match the mapped variable. If your mapped variable goes true for a second and then goes false, the output will also go true for a second and then go false. However, you could pretty easily change the behavior in code by separating the output itself from other variables. Here is a simple example:

OutputValue := (SetOutput OR OutputValue) AND NOT ResetOutput;

When SetOutput goes true, OutputValue (which is mapped to the DO module) will turn on. SetOutput can then go false but the output will remain on until ResetOutput is set.

Hi Marcus
Thanks for your reply. I checked the CAN message with a CAN reader and saw that the Signal from my controller (SPS) is sent with 1 (true) every 1000ms but there is no Signal with 0 (false) in the meantime. So for me its not clear what triggers this behavior. The X20DO4322 module seem to have a default “false” setting which is executed every 1000 ms.

Since the module is a sourcing output, the default is for it to not output voltage unless it receives a “true” signal. I’m not sure what you mean by

Signal from my controller (SPS) is sent with 1 (true) every 1000ms but there is no Signal with 0 (false) in the meantime.

Do you mean that the CAN cycle time is 1000ms? To me this implies that the signal is false and you change it to true every 1000ms. If it needs to be changed, then it is not staying true.

Can you trace the variable mapped to the output to verify that it is staying true? It sounds to me like you are expecting to see this:

but you’re actually seeing this:

Am I understanding correctly?

I’m sending a Signal to the Module X20DO4322 like to following:

So every 1000ms a 1 is sent via CAN bus.

I would expect an output by the X20DO4322 like you described it. But i get a blinking output by the X20DO4322:

I hope this helps.

May I ask which buscontroller you are using ?

Any DO module cannot be placed on native CAN and therefor you need to use a buscontroller - I assume it is a BC0043 ?

Sure.

No its not a BC0043. We use the X20CP1484 and the X20IF1072 for the CAN bus interface.

So you receive value over CAN (“1”) and want to put this to the output card.

If this is the case then something in you applicaiton overwrites the value which is assigned to the DO module. Bascially one “1” would be neough. You copy this value to the variable assigned to the digital output module and thats it. The system itself will not set the variable back to “0”

So either you send a “0” again on the bus or your application writes a “0” to the variable

okay thanks for clarification.

That’s exactly what i thought should be the case. Then I have to find the culprit who is setting the signal back to false ^^. Interesting is, that i can see the “1” message in the CAN with a CAN reader but no Signal with “0” to the same address. Thats why i thought the system itself sets the variable back to 0.

1 Like