Analog Out enabled on bit 0 value for Analog2

Application-specific PCAN-MicroMod Motherboards
Post Reply
Foxtrott
Posts: 4
Joined: Mon 28. Sep 2015, 05:24

Analog Out enabled on bit 0 value for Analog2

Post by Foxtrott » Mon 28. Sep 2015, 05:43

Hi,

I would like to trigger two LED's connected to the AOut 0 and AOut1 depending on the
state of the same 1-bit signal on CAN.

I'm only able to turn either ON when the bit value is = "1" but not when it's "0".

Would it be possible to create the following logic in PCAN MicroMod for Analog2?

Bit Value AOut1 AOut2
0 ON OFF
1 OFF ON

If this can only be done using custom firmware could someone please provide and example code on how
this could be done?

Thanks

User avatar
G.Bohlen
Hardware Development
Hardware Development
Posts: 51
Joined: Wed 22. Sep 2010, 21:38

Re: Analog Out enabled on bit 0 value for Analog2

Post by G.Bohlen » Mon 28. Sep 2015, 15:31

Hello,

please look at the attached example:
AOUT 0 is controlled via CAN-ID 0x100, Byte0, Bit 0. Scale is set to -4000, Offset is set to 4000.
If the bit is 0:
(0* -4000) + 4000 = 4000 (led goes on)

if the bit is 1:
(1* -4000) + 4000=0 (led goes off)

AOUT 1 is also controlled via CAN-ID 0x100, Byte0, Bit 0. Scale is set to 4000, Offset is set to 0.
If bit is 0:
(0* 4000) + 0 = 0 (led goes off)

If bit is 1
(1* 4000) + 0 = 4000 (led goes on)

A value of 4000 represents ~9.75V.

Regards,
Gunnar Bohlen
Attachments
AO0_AO1_1bit.mcf
(1.69 KiB) Downloaded 652 times

Foxtrott
Posts: 4
Joined: Mon 28. Sep 2015, 05:24

Re: Analog Out enabled on bit 0 value for Analog2

Post by Foxtrott » Mon 5. Oct 2015, 08:58

Hi Gunnar,

Thank you very much for the input. This was exactly what I wanted to have.

Is there by any chance also the possibility of having the output run with a frequency
output or is this only available on other hardware models?

Thanks

M.Maidhof
Support
Support
Posts: 1366
Joined: Wed 22. Sep 2010, 14:00

Re: Analog Out enabled on bit 0 value for Analog2

Post by M.Maidhof » Mon 5. Oct 2015, 13:55

Hello,

the Analog2 MicroMod don´t have frequency outputs. Only the Digital1/2 and Mix MicroMod modules offers frequency outputs. Please see product info on our website for more details.

regards

Michael

Post Reply