Automatic Dip Switch

Automatic Dip Switch

Anonymous
Not applicable
3,843 Views
15 Replies
Message 1 of 16

Automatic Dip Switch

Anonymous
Not applicable

 

Hi!

In my job I have to do several electrical drawings per week and many of them include dip switches for each component. Currently you have to enter the address/value and then manually adjust the switches for the correct value/address.

 

I am wondering if it is possible to program, or to find a block somewhere, that has automated this. So when entering the value, the switches automatically change to the correct value?

Anyone have experience in this?

Dip.PNG

 

 

Sincerely,

Dom

0 Likes
3,844 Views
15 Replies
Replies (15)
Message 2 of 16

steven-g
Mentor
Mentor

What version of Autocad do you use, and those look like flip actions does the block contain anything else, is the idea to insert the block using it's values or change it at some point later, having asked all that Dynamic blocks are notoriously difficult to control outside of the grip functionality and default insert settings.

0 Likes
Message 3 of 16

h_s_walker
Mentor
Mentor

If those are flip states you could use a lookup table.

 

Put in all the values and all the separate flip states in a lookup table then when you choose a value the buttons will automatically flip

 

 

See the attached drawing

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 4 of 16

steven-g
Mentor
Mentor

Smiley Frustrated Nice idea, but thats 9 columns to fill in for the lookuptable, and 256 rows. And when you have completed that task the only way to select anything above 9 is by scrolling, typing just selects the laster cipher used, I know, I once did something similar.

0 Likes
Message 5 of 16

h_s_walker
Mentor
Mentor

I wonder is there a way to select a lookup value depending on attribute text?

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 6 of 16

steven-g
Mentor
Mentor

Not that I know of but you could make it a double lookup and have the second one linked to just a linear parameter with a stretch action with 256 lengths, The linear parameter length can be input by keyboard, but you still have to fill in 2816 values in lookuptables, I haven't found a way yet to automat that. Smiley Sad

0 Likes
Message 7 of 16

MMcCall402
Mentor
Mentor

Test out the attached block.  The block has a use parameter for selecting the address value and will then flip the switches appropriately for that value based on entries in a block table within the block.

 

The table entries were made in excel and then pasted into the block table.  2304 entries, yet easily created in excel by pasting the values into the correct pattern.

 

I was hoping the address value could be typed into the cell in the autocad properties window but it acts very squirly while typing. The value can be selected from from the list with no problem.

 

I put an attribute in the block to display the value of the user parameter. (via a field value)  it will update but only after a regen.

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

Message 8 of 16

Libbya
Mentor
Mentor

Nice block.  You can actually add the attribute to the block properties table and have it fill in the value directly, avoiding the need for regen.  Here's the block back eliminating the need for regen.  I also added a rotate parameter in order to give a grip that you can click on and enter dynamic input directly rather than going to the properties palette.  

Message 9 of 16

MMcCall402
Mentor
Mentor

Interesting, I tried adding the attribute to the block table rather than using a filed but it didn't work for me.  (I must have messed something up)  I like the instant updating of the displayed value.

 

I'm not sure I understand what the rotation parameter adds to the block other than a handle to drag around and kind of blindly select a value.

 

Typing the value in somewhere would probably be best but I couldn't figure that part out.

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

Message 10 of 16

Libbya
Mentor
Mentor

If you have dynamic input on then you can select that rotate grip and type in the value.  It can be a little weird if your current value is over 180 (displayed angle descends rather than ascending from 180-255).

Message 11 of 16

wr.marshall
Advisor
Advisor

I have created what I think your after by selection a number it automatically changes the output number and flips switches accordingly. How it works is the number is just text. By the looks you will need 256 text objects and change each one to a given number. I have created the first 4. Create 256 visibility states and call them as desired but for ease just number them accordingly. You will then need to hide and unhide a particular number for a particular visibility state. so Text=100 visible for VS 100 but hidden all others etc. Dont worry about flipping at this stage. Once completed the 1-256 Visibility States and each text object you will see an item marked Number. This is your pull down you will use. just expand for the other numbers. you will notice it has a column for the position x. This is a free for point, but this could relation to anything like a dimension or a flip state etc... just relate this number to the number required so 50 for 50 71 for 71 etc... The number in the right column is the name that would appear in the pull down in the drawing. Next you will see an item called Data with 2 lookups below marked input and output. Input basically says what it needs to check. so if pos x is 1 then the input is 1.... the right is only a reference for the output. once completed go to the output. here you reference the visibility state and then flip your switched too. I have done the first 4 as an example. you will notice I have named number 4 "cat" this is just to show that it is separate from the number pull down look up. If something doesn't make sense Please ask and I will try explain further. Hopefully this example resolve question though

 

update: probably hide your flip switches too. Will look into a way where by when yo flip a switch it will control the number. This just probably is moving the flip controls in the output to the input. for data

Message 12 of 16

wr.marshall
Advisor
Advisor

done version that is managed by flipping. again only first 4 controled by switch 7 and 8. by flipping these the number will update accordingly

Message 13 of 16

TBrockmanB5KLD
Explorer
Explorer

I know that this is an old post, but here is the finished version. Hope it helps someone someday!

Message 14 of 16

Benjamin_Browning
Explorer
Explorer

This is useful. Do you happen to have a 4-bit and a 2-bit version of this dip switch?

0 Likes
Message 15 of 16

h_s_walker
Mentor
Mentor

@Benjamin_Browning It was very easy to do you just needed to delete the not needed visibility states and change the double lookup. See the attached drawing

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 16 of 16

Benjamin_Browning
Explorer
Explorer

Thanks!

0 Likes