LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Digital Out on 6133 board using RT

I would like to right a simple VI that writes data to digital outputs of a 6133 board on a SBC using Labview RT.
0 Kudos
Message 1 of 15
(6,523 Views)

Hello. 

Thank you for posting to the NI Discussion Forums. 

There are numerous examples that show how to write to digital lines on a S series DAQ card.  All of these can be found inside of LabVIEW's Example Finder.  The Example Finder can be launched from either the front panel or the block diagram by clicking on Help>>Find Examples.  Once the Example Finder window launches, you will be able to search a directory tree structure.  Please click on Hardware Input and Output>>DAQmx>>Digital Measurements>> "Write Dig Port.vi" or "Write Dig Chan.vi".  These two examples will be great starting places. 

Are you having any difficulty with developing this part of your application or are you having troubles with LabVIEW RT?  Please let us know if you run into any specific roadblocks and we will be happy to help you further!

Have a great day!

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 2 of 15
(6,500 Views)
The final RT application will be stand-alone, and will run as an executable.  The final host will be a Linux based computer.  I'm just trying to understand how the RT application can communicate to the 6133 board.  I don't know if it's best to use the measure and automation explorer to configure the board and assign an ID, and then use that ID in the RT application, or if it's best to configure the board from the RT application.  I'll start out with the simple VIs that you have recommended to get a fill for the software.
 
In a further step in the design, the RT application must transfer a waveform to the 6713 board using DMA.  But I'm working toward that step.
 
solitude
 
0 Kudos
Message 3 of 15
(6,497 Views)
I can view the 6133 and 6713 devices in MAX.  They appear as NI PXI-6133: "PXI1Slot3" and NI PXI-6713: "PXI1Slot4".  When I attempt to view the properties of a device, MAX freezes and I have to restart MAX.  If I attempt to create a task using MAX, I get a message "Some components required for editing are missing.  Please contact National Instruments for more information."
 
The goal is to use the VIs that you recommended, and the I/O line that is attached to the DAQmx Create Virutal Channel.vi in the example VI is identified as "Dev1/port0/line0:7".  I don't have a Dev1/port0/line0:7 in MAX.  I try to change the Dev1/port0/line0:7 by selecting the browse, but the browse does not have any information.  I have also tried a I/O constant, and then placing the name PXI1Slot3 into this constant, but I get an error message when running the VI.
 
Any thoughts?
 
0 Kudos
Message 4 of 15
(6,476 Views)

I made some progress.  I had failed to deploy the VI to the RT system.  I went ahead and created a simple RT project, added the VI to the project, deployed the VI to the RT system, and now the VI writes data out to the 6133 board.

This is good progress.  When executing the VI, I can now use the drop down button (rather than the browse button) and the I/O control lists the PXISlot3 and PXISlot4, and all port/line combinations.

solitude

 

0 Kudos
Message 5 of 15
(6,472 Views)
Where is the MAX configuration file located for an RT system?
 
solitude
 
0 Kudos
Message 6 of 15
(6,401 Views)
Hi Solitude,

In order to save NI-DAQmx devices, tasks, and/or channels you are required to export the configuration of a remote system from your host PC. The Configuration Export Wizard (see file >> export and drop down to the appropriate system) allows you to specify the path to which you would like to export the file. This will determine the location where the configuration will reside. To use saved NI-DAQmx devices, tasks and/or channels, you must then proceed by importing from the specified location. I hope this helps.

Best regards,

Steven
0 Kudos
Message 7 of 15
(6,372 Views)
Steven,
 
Let's suppose that I do not export the configuration of a remote system.  Does the configuration of a remote system reside on the host PC?  I browsed around the folders on the remote system and I could not find any kind of configuration file.  If I create a stand alone RT executable and load it in the start folder on the RT system, how does the stand alone RT executable locate the configuration?
 
I have a simple VI that runs a task to write to the digital output of the 6713 board.  I have changed the name of this device in MAX.  I use this same name to create a task and write data out the digital port.  The creation of this task, and writing data out the digital port, is a VI that I have deployed on the RT (not running as a stand alone RT executable).  The VI runs, but I'm not sure if the VI located the configuration file on the RT system or on the host.
 
solitude
0 Kudos
Message 8 of 15
(6,344 Views)
Steven,
 
I have made good progress on reading data from the 6713 board.  I am now turning my attention to writing data to the analog out on the 6713 board.  I have about 80000 data points that I would like to send to the analog out channel on the 6713 board.  The data points have been prepared as unsigned integers in the range of 0 to 4095, where 2048 is to represent 0 volts.  I would like to use DMA to send the data from the SBC to the 6713 board.  The DAQmx Create Virtual Channel forces a selection of either voltage or current.  If voltage is selected for the analog out, the range defaults to -10 and +10 volts.  What VI or VIs do you recommend sending this data?  The sample rate is about 600 kHz, which means the 80000 data points represent a waveform of about 133 ms in length.  I also need to synchronize multiple channels with the identical waveform.
 
Thanks for your help,
 
solitude
 
0 Kudos
Message 9 of 15
(6,116 Views)
Hello. 
 
If your data ranges from 0 to 4095 with 2048 = 0V, 0 = -10V, 4095 = 10V, then all you need to do is scale the data to find the voltage that will need to be input to the DAQmx Write VI.  The 6713 DAQ card only can output between -10 and 10 Volts so you will have to scale the data to fit inside this range.  The setup of the VI's will be almost exactly the same as your read task, except DAQmx read will be replaced by DAQmx write. 
 
If you have additional questions about something specific, feel free to let us know!
 
Brian F
Applications Engineer
National Instruments
0 Kudos
Message 10 of 15
(6,065 Views)