Post DIN

Things to come.
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Post DIN

Post by oakbarn »

Would it be be possible to make the POST API of DIN {on} be read/write instead of read only?
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Post DIN

Post by JonW »

oakbarn wrote:Would it be be possible to make the POST API of DIN {on} be read/write instead of read only?
The only way the value can be represented to be ON, is if it is triggered by a 5V input signal. Using the API to say that it is ON would not make it so.
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Post DIN

Post by brahn »

Right, what Jon said. DIN is set by the 5V input to the pin on the processor, it would be overridden instantly if turned on via API.
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Post DIN

Post by oakbarn »

brahn wrote:Right, what Jon said. DIN is set by the 5V input to the pin on the processor, it would be overridden instantly if turned on via API.
If you could POST, and it was "overridden instantly" and it was set to "One Shot" in Settings, would it work like a Normal DIN that was "One Shot" ?
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Post DIN

Post by brahn »

Inputs update before the states, so no that wouldn't work.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Post DIN

Post by clearwaterbrewer »

set up a logical 'or' in ladder logic with a register? (been out of the actual programming part for a bit now, so terminology may not be correct)
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Post DIN

Post by brahn »

The request is to modify the BCS API to allow a DIN to be asserted through software. This creates a conflict with the physical DIN. You bring up a good point with the registers. I could see adding an API for registers and allowing them to be controlled via the API, though they may be overwritten by ladder logic/state/etc. I'd need to think about this some more to see if it would raise any issues.
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Post DIN

Post by oakbarn »

clearwaterbrewer wrote:set up a logical 'or' in ladder logic with a register? (been out of the actual programming part for a bit now, so terminology may not be correct)
I have done some of that using registers in Ladder Logic. You can actually make your logic "State" specific using the registers "asserted" in a State. What I was trying to do is to be able to use my computer to activate a DIN. I use the DINs for float switches and also use two to advance within a Process as an exit condition of a State. Just sometimes I am near my computer rater than the DIN switch. I have to walk over to flip the State Advance. If it was usable in the API, I could use it there, but it is not. Trying somewhat to duplicate the old web buttons.
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: Post DIN

Post by brahn »

If all you're using the DIN for is to advance to the next state, just click the next state on the PC. That works the same way as the old web inputs.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Post DIN

Post by JonW »

Oakbarn - I'm having a hard time understanding why you would want to use the DIN exit condition via the API. Are you using the API for a custom interface? The whole idea with the process/state controllers in 4.0 was to show you the current state of every process and to be able to immediately jump to any state needed. In addition to the UI, you can also do that via the API. There's nothing to gain from a writeable DIN that isn't already available.
Post Reply