Support Forums
Digital Input switch

Hello,

I am reading Digital Input 1, where a switch is connected, with 1DS command. I would like to convert the 0 (closed contact) and 1 (open contact) status to 0(open contact) and 5 (closed contact).

Thank you,

Richard

Hello, I am reading Digital Input 1, where a switch is connected, with 1DS command. I would like to convert the 0 (closed contact) and 1 (open contact) status to 0(open contact) and 5 (closed contact). Thank you, Richard

Good morning Richard

Simplest way is to use a span

e.g.

Begin
S1=1,0,0,1

ra1s
1DS(S1)
end

Cheers

Roger

Good morning Richard Simplest way is to use a span e.g. Begin S1=1,0,0,1 ra1s 1DS(S1) end Cheers Roger

Hi rcote and Roger,

Polynomial can also be used:

BEGIN
Y1=0,5
RA1S
1DS(Y1)
END

Best regards,
Rudy Gunawan

Hi rcote and Roger, Polynomial can also be used: BEGIN Y1=0,5 RA1S 1DS(Y1) END Best regards, Rudy Gunawan

Also, I forgot to ask, I am reading 1DS from Dasylab, and as soon as I load my Datataker schedule to read 1DS, the initial reading of 1DS is 0 which means Datataker is reading a closed contact of my switch, which is not the case, and that initial 1DS status unwillingly triggers data aquisition to a file. Is there a way to set 1DS to 1 pr is there an initial 5 second delay I can set.

Thank you much,

Richard

Also, I forgot to ask, I am reading 1DS from Dasylab, and as soon as I load my Datataker schedule to read 1DS, the initial reading of 1DS is 0 which means Datataker is reading a closed contact of my switch, which is not the case, and that initial 1DS status unwillingly triggers data aquisition to a file. Is there a way to set 1DS to 1 pr is there an initial 5 second delay I can set. Thank you much, Richard

Hi rcote,

I am sorry that I did not read your email clearly and missed the swap point.
My previous program does not swap between open and close state just multiplying the value by 5.

I give you another one which also swap the state:
Y1=5,-5
RA1S
1DS(Y1)
END

Probably that is the reason why dataTaker reading 0 on close contact in your circuit.
Could you check the program again and confirm about the result?

Best regards,
Rudy Gunawan

Hi rcote, I am sorry that I did not read your email clearly and missed the swap point. My previous program does not swap between open and close state just multiplying the value by 5. I give you another one which also swap the state: Y1=5,-5 RA1S 1DS(Y1) END Probably that is the reason why dataTaker reading 0 on close contact in your circuit. Could you check the program again and confirm about the result? Best regards, Rudy Gunawan

Thank you Rudy,

The original issue you resolved, but my second issue where Dasylab temporarily gives me a logic of 1 even if my physical switch contacts are not closed is not resolved and I realized that the issue does not originate from the Dt80, but rather from Dasylab, so I am ging to post on Dasylab forum.

Than you again for your help,

Richard

Thank you Rudy, The original issue you resolved, but my second issue where Dasylab temporarily gives me a logic of 1 even if my physical switch contacts are not closed is not resolved and I realized that the issue does not originate from the Dt80, but rather from Dasylab, so I am ging to post on Dasylab forum. Than you again for your help, Richard

Hi Richard,

If you measure digital state from dataTaker 1D directly (when the contact is open) you will get a value of 1.

This is because 1D...4D have a 47kOhms pull up resistor which make their default digital state are 1.

In my program I use polynomial scaling to change the status of digital state reading through manipulation but it won't change the actual digital status.
I assumed this cause DasyLab to pick up state 1.

If you want to have digital state 0 when the contact is open then you must use 5D...8D.
They have a 200kOhms pull down resistor which make their default digital state are 0.

Best regards,
Rudy Gunawan

Hi Richard, If you measure digital state from dataTaker 1D directly (when the contact is open) you will get a value of 1. This is because 1D...4D have a 47kOhms pull up resistor which make their default digital state are 1. In my program I use polynomial scaling to change the status of digital state reading through manipulation but it won't change the actual digital status. I assumed this cause DasyLab to pick up state 1. If you want to have digital state 0 when the contact is open then you must use 5D...8D. They have a 200kOhms pull down resistor which make their default digital state are 0. Best regards, Rudy Gunawan
31
7
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft