D
dchendrickson
I am using Access 2002/XP.
I am creating an application that is tracking circuit
paths on a circuit card. This card can be configured in
several ways by setting jumpers (wire wraps) between pins
(terminals) on various connectors mounted to the card.
Signals come into the card via a connector on the front
edge, travel accross the card through various paths
determined by the jumpers, and eventually exit the card
through a connector on the rear edge.
I have a table that contains an entry for each connector
(ConnectorID, Name, Part#, etc) [tblConnector].
A second table contains entries for each pin (terminal)
in each connector. This table is linked to the
tblConnector table via the ConnectorID. The fields
consist of PinID (autonumber), ConnectorID, PinLabel,
PinConnectsTo. PinConnectsTo is linked to the PinID in
the same table [tblPin].
The pins on the front edge connector are permanently
connected to the pins on a card surface connector and
this connection is defined by the conductor traces etched
in the card. So PinConnectsTo holds the PinID of the pin
in the other connector that the current record is
permanently etched to. A specific pin is always connected
to the same place.
The various ways this card can be configured are called
versions and there is a tblCardVersion table that
contains VersionID, Description.
And finally there is a table that contains the pin
connection information for the various versions
[tblPinVersion]. This table contains PinID, VersionID,
PinMatesTo. The PinID and VersionID make up the Primary
Key and the PinID is the same as in the tblPin table.
PinMatesTo, like PinConnectsTo, refers to the PinID that
the current record pin has been jumpered to.
Finally to my question: I need to develop a query that
will 'walk' across the circuit path from front connector
to the rear connector and show each connection step. For
example:
J1-1 connects to H7-1 Mates to H12-1 connects to J2-A12
'format is [ConnectorLabel]-[PinLabel]
This example shows one intermediate step between J1
connector (front) and J2 connector (rear) but there could
be more or less.
My first stab at the query grabs all the pins for the J1
(front) connector and then has a series of expressions
using the dlookup method to pull the rest of the
connections:
PinConnectsTo1: dlookup("PinonnectsTo","tblPin","PinID
= " & [PinID])
Then the next expression is the same for PinMatesTo but
refers to the expression above:
PinMatesTo1: dlookup("PinMatesTo","tlbPinVersion","PinID
= " & [PinConnectsTo1])
And so on...
Note: these are not the exact expressions, but the right
idea. Care has been take to isolate which version is
being queried and soforth.
This works, but is VERY slow and not suited to a path
that has differing numbers of intermediate connections
across the card.
Can anyone suggest a structure that would be more
efficient and also a way to parse the path until the rear
connector is reached (do until J2)?
Thanks for your help and my appologies for the long
description.
-dc
I am creating an application that is tracking circuit
paths on a circuit card. This card can be configured in
several ways by setting jumpers (wire wraps) between pins
(terminals) on various connectors mounted to the card.
Signals come into the card via a connector on the front
edge, travel accross the card through various paths
determined by the jumpers, and eventually exit the card
through a connector on the rear edge.
I have a table that contains an entry for each connector
(ConnectorID, Name, Part#, etc) [tblConnector].
A second table contains entries for each pin (terminal)
in each connector. This table is linked to the
tblConnector table via the ConnectorID. The fields
consist of PinID (autonumber), ConnectorID, PinLabel,
PinConnectsTo. PinConnectsTo is linked to the PinID in
the same table [tblPin].
The pins on the front edge connector are permanently
connected to the pins on a card surface connector and
this connection is defined by the conductor traces etched
in the card. So PinConnectsTo holds the PinID of the pin
in the other connector that the current record is
permanently etched to. A specific pin is always connected
to the same place.
The various ways this card can be configured are called
versions and there is a tblCardVersion table that
contains VersionID, Description.
And finally there is a table that contains the pin
connection information for the various versions
[tblPinVersion]. This table contains PinID, VersionID,
PinMatesTo. The PinID and VersionID make up the Primary
Key and the PinID is the same as in the tblPin table.
PinMatesTo, like PinConnectsTo, refers to the PinID that
the current record pin has been jumpered to.
Finally to my question: I need to develop a query that
will 'walk' across the circuit path from front connector
to the rear connector and show each connection step. For
example:
J1-1 connects to H7-1 Mates to H12-1 connects to J2-A12
'format is [ConnectorLabel]-[PinLabel]
This example shows one intermediate step between J1
connector (front) and J2 connector (rear) but there could
be more or less.
My first stab at the query grabs all the pins for the J1
(front) connector and then has a series of expressions
using the dlookup method to pull the rest of the
connections:
PinConnectsTo1: dlookup("PinonnectsTo","tblPin","PinID
= " & [PinID])
Then the next expression is the same for PinMatesTo but
refers to the expression above:
PinMatesTo1: dlookup("PinMatesTo","tlbPinVersion","PinID
= " & [PinConnectsTo1])
And so on...
Note: these are not the exact expressions, but the right
idea. Care has been take to isolate which version is
being queried and soforth.
This works, but is VERY slow and not suited to a path
that has differing numbers of intermediate connections
across the card.
Can anyone suggest a structure that would be more
efficient and also a way to parse the path until the rear
connector is reached (do until J2)?
Thanks for your help and my appologies for the long
description.
-dc