12-13-2024 01:40 PM - edited 12-13-2024 01:52 PM
I'm extremely new to Labview and NI products, so if this is not posted on the correct board or has a solution, please communicate that, thank you!
Equipment I am using:
NI USB-6501
G4PB161
G4ODC5 x4(at the moment)
I have access to NI MAX and Labview 2021 and a few older licenses (but don't know how to access them)
I am trying to use the 6501 to trigger a set of relays (4 at the moment) in a specific sequence within a preset time frame. My intent is to use the various digital ports, in open collector mode, to output a ~5V signal to trigger/activate a relay.
I have tested this with my current setup in the NI MAX test panel and I can activate all the relays individually and all at once, so the physical setup is functional. Where my trouble starts is trying to develop a program to automate this process that allows me to change the activation time (initiation and duration), and how I want this to loop (or to not loop and be single event with a manual re-start). I have looked around the community and youtube and have found information that seems to get me close, but then as I try to replicate I hit roadblocks due to my inexperience with Labview. I did find one very hopeful example (https://forums.ni.com/t5/Example-Code/Use-NI-DAQmx-Digital-Output-Lines-to-Control-Relays-in-NI-Swit...) but I do not have access to Switch Executive in order to complete the steps to use this dll. It seems like the solution would be fairly straight forward, but having only the last four days for exposure to Labview and NI I am finding it a bit more difficult to derive an appropriate solution. If there is any need for more information, datasheets, or sketches I can try to provide them. Any help on this or suggestions would be amazing! Thank You!
Edit: I should add that I also have CB-68LPR with the PCI connection and have tried to develop a program to use that directly (control the relays etc.). Any combo of devices that I could use to get this idea off the ground or any example VI's that I might be able to modify would be extremely helpful
Solved! Go to Solution.
12-13-2024 07:20 PM
It might be too much information but it will help you to understand how to use digital waveform with NI-DAQmx.
Writing a Digital Pattern Using DAQmx in LabVIEW
12-16-2024 09:21 AM
Oh wow, I think this is exactly what I need!
Just quickly reviewing the info I should be able to develop what I need from this article.
Thank you!
12-16-2024 09:22 AM
Take a look on the example DIGITAL - SW Timed output.vi
and modify it according to your needs, from what I understood, you will need to change the pattern you are writting to the digital port and write it to the digital port at a rate you defined. If you get stuck, share your code for Lab 2020 version.
12-16-2024 12:15 PM
Any tips on why I get this error when trying to connect the required arrays?
Again, I'm using LabVIEW 2021 SP1
12-16-2024 01:38 PM