LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help adapting ADLINK PCI-7396 DI/DO examples into a custom tester architecture

Solved!
Go to solution

b8e84d27-0261-4333-964d-758058b3737c.jpgb8e84d27-0261-4333-964d-758058b3737c.jpg

82e6cec9-6aaa-4390-8195-245d37ccf7d7.jpg82e6cec9-6aaa-4390-8195-245d37ccf7d7.jpg

16e53bc2-91ed-4a73-bfdd-fa8894a33eb6.jpg16e53bc2-91ed-4a73-bfdd-fa8894a33eb6.jpg

 How do I 

2d7d30fb-faae-4b49-bd73-1d80afe72284.jpg2d7d30fb-faae-4b49-bd73-1d80afe72284.jpg

ddf4d9df-6df6-4f5b-a1ba-6bded7f86d99.jpgddf4d9df-6df6-4f5b-a1ba-6bded7f86d99.jpg

baf723b3-ae2f-4b0d-9700-6fa8a1864a31.jpgbaf723b3-ae2f-4b0d-9700-6fa8a1864a31.jpg

f43a2ea2-467c-4b2f-9552-b6742f92d78f.jpgf43a2ea2-467c-4b2f-9552-b6742f92d78f.jpg

Hi everyone,

I am working on a tester project using an ADLINK PCI-7396 card and I'm running into some trouble integrating the vendor's example code into our custom tester framework.

My goal is to configure several ports (Ports 0 through 6) as either Digital Input (DI) or Digital Output (DO) based on a predefined array, and then pass those references to my main tester loop for continuous reading and writing.

What I have from the ADLINK Examples: I have the standalone examples for the PCI-7396 (PCI-7396_DI by Port.vi and PCI-7396_DO by Port.vi). I understand from these examples that I must configure the port direction first.

  • For DO: Digital Output.vi -> PortConfig.vi (Set to DO) -> Loop (Digital Output by Port.vi)

  • For DI: Digital Input.vi -> PortConfig.vi (Set to Input) -> Loop (Digital Input by Port.vi)

My Current Implementation: Because my tester has a distinct Initialization phase and a Main loop phase, I cannot use the continuous While/Event structures from the examples directly.

  • I have an Initialize VI with a For Loop and a Case Structure that iterates through Ports 0-6.

  • Inside the case structure, I am using Digital Output.vi and PortConfig.vi to set up the DO ports, and similarly for the DI ports.

  • I am then outputting an array of Device Handles (DIO Hdl Arr ADL_7396-1) to pass to my Main VI.

My Questions:

  1. Am I handling the PortConfig correctly by putting it inside a For Loop during my Initialization state?

  2. In my Main VI, how should I correctly unpack the array of Device Handles (DIO Hdl Arr ADL_7396-1) so that I can independently write to the DO ports and read from the DI ports using Digital Output by Port.vi and Digital Input by Port.vi?

  3. Are there any common pitfalls when separating the initialization of these ADLINK cards from the actual read/write loops?

0 Kudos
Message 1 of 5
(666 Views)

We cannot analyze blurry photographs of a monitor.

0 Kudos
Message 2 of 5
(620 Views)

@altenbach wrote:

We cannot analyze blurry photographs of a monitor.


Best -- simple Project in "not-the-latest-version-of-LabVIEW" (such as "LabVIEW 2021") that shows the code you are trying to develop.

 

Next-best -- LabVIEW "Snippet" of example Block Diagram, which should give a clear .png file that, in principle, can be "expanded" into actual LabVIEW code by dropping in a suitable (blank) Block Diagram.

 

Bob Schor

 

 

0 Kudos
Message 3 of 5
(573 Views)
Solution
Accepted by topic author FineSoFine

I think already fixed thanks guys

Download All
0 Kudos
Message 4 of 5
(559 Views)

Hi Fine,

 


@FineSoFine wrote:

I think already fixed thanks guys


Nope, you still attach blurry JPG photographs instead of the requested (code) snippets…

 

And you still use way too many local variables and sequence frames!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(548 Views)