What is writing to digital port

Hardware: NI PCI-MIO-16E "DEV1" connected to an SCB68.
I have a Global Virtual Channel "KeyRun" assigned to Dev1/port0/line1
Within some VI in the project, there is something writing to that port/line directly without using DAQmx.  I renamed the Global Virtual Channel to another name and the rogue VI still wrote to the port/line.  I renamed the device and the rogue VI still wrote to the port/ine.
The code was originally created before 1996 and has been passed through multiple people. I'm guessing there is an old way of writing to I/O of which I'm not aware. I'm not even sure what to search for other than DAQmx VI's, DAQmx global channels and property nodes.  

A program that old is probably using the traditional DAQ driver instead of DAQmx. I don't remember the exact names of the functions but viewing the hierarchy should help.

Similar Messages

  • Writing to digital port disrupting counter on PCI-6259? (nidaqmxbase)

    Hello,
    I've set up my PCI-6259 with an angular encoder counter, as per the C code example at http://zone.ni.com/devzone/cda/epd/p/id/5735
    This appears to work great, but I would also like to use my PCI-6259's digital lines to control a TTL switch on the encoder it's measuring (among other things). If I set up a separate task in the same program and install a new DOChan to the task, it works great: I can control the TTL and measure the encoder position at the same time.
    However, I would like to be able to control the digital lines, e.g., via a script, while leaving the encoder readout running continuously. I tried running the angular encoder counter example code, and while it was running, I ran the dio/writeDigPort example.
    First of all, the writeDigPort took about 3 times longer than usual to run. It wrote to the digital line successfully, but as soon as it had, it corrupted the counter somehow. The angular encoder example began to spit out garbage, rather than the measured angle.
    Is this just a limitation of nidaqmxbase, wherein I cannot use the PCI-6259 resource from multiple processes? I can imagine this being the case, since I think the counter setup is using a DMA.
    Or is there a workaround? Any advice is much appreciated, thanks!
    -Chase

    I think what was meant is that DAQmx Base is not multi-thread safe.  From the readme:
    NI-DAQmx Base is not multi-thread safe. In LabVIEW, use the error cluster to
    force execution order. In C, use only one thread to make API calls; especially
    for task/channel creation and deletion.
    So, if using DAQmx Base, all of your functions should be in the same thread (i.e. don't make parallel calls to the driver).
    Having said this, I notice you're using the PCI-6259 which is supported in DAQmx for Linux.  You didn't mention what OS you're using, but if you are able to use the full version of DAQmx I would recommend doing this.  DAQmx is multi-thread safe, and provides more functionality and better performance than DAQmx Base.
    Best Regards,
    John Passiak

  • Trouble writing to all three digital ports

    I am controlling three motors with 24 digital lines, 8 for each. The code is attached. Two of the motors will run but the third always crashes (vibrates and trips). When I swap the ports on the three port configurations I can get ANY two motors to run smoothly, but never the third. The problem seems to be isolated to the bottom (see attached code) port configuration and write. I have deleted and reinserted fresh vi's, but no luck.
    I am running a LabPC 1200 board and have tried this with the same error on a LabPC+.
    Is there a better way to write bytes of data to ports?
    Thanks a lot!!!
    -Kyle
    Attachments:
    3motor_test.vi ‏122 KB

    Thanks for contacting National Instruments. After taking a look at your code, I can see that there are a couple of issues here.
    The first is that you are configuring the ports during every iteration of the loop. You should move the port config VIs out of the loop. Having them inside is bad because you really only need to configure the ports once, before you start writing to them. Doing this every iteration adds a lot of overhead, and it also amplifies the effects of the second problem.
    The second problem is that your boards are resetting all the ports every time you configure any port. All National Instruments products that have an 8255 or 82C55 digital chip, including the Lab-PC, will exhibit this behavior. When you change the configuration
    of one digital port on an 8255, the digital lines on ALL of the ports are reset. This is the way the 8255 chip works. The 8255 consists of three ports, each containing 8 digital lines (24 total). To properly use the chip, all configuring needs to be done prior to setting the output states of the lines.
    For more information on this issue, see the linked KnowledgeBase:
    http://digital.ni.com/public.nsf/websearch/3E25A9780F2C48B986256120005AF098?OpenDocument
    So you can see that moving the config VIs outside of the loop should address both problems. This should do it, but if it doesn�t, please let me know.
    -Mike

  • TS1574 optic digital port can't be shut off and the sound of speakers not working! what to do?

    optic digital port can't be shut off and the sound of speakers not working! what to do?
    this happened after taking out the head-phones. Now even after pressing CMD+ALT+P+R when booting - the sound of booting appeares BUT after the desktop is ready the sound doesn't work and sound buttons show the sign "circle with crossed line"

    If there is a red light visible in the audio output port, the switch id stuck.  Insert the earphone jack a few times.  If that fails to trip the switch, try a toothpick or similar device and jiggle it inside the port.  If that fails, try a shot or two of compressed air.  If still no success, go to a repair facility.
    Ciao.

  • I write digital port by 'DAQmx Configure Logging.vi​' and receive TDMS file with 8 boolean channels. How can I write to 1 integer channel?

    Hello!
    I want to write 1 digital port from PXI-6536 with streaming to TDMS file.
    I'm writing by 'DAQmx Configure Logging.vi' and become TDMS file with 8 boolean channels.
    How can I write to 1integer channel?
    Attachments:
    1.JPG ‏27 KB

    Hey Atrina,
    The actual data stored on disk is just the raw data (that is, a byte per sample in your case).  It's really just a matter of how that data is being represented in LabVIEW whenever you read back the TDMS file.
    I'm not sure if there is a better way to do this, but here is a way to accomplish what you're wanting:
    Read back the TDMS file as a digital waveform.  Then there's a conversion function in LabVIEW called DWDT Digital to Binary.  This function will convert that set of digital channels into the "port format" that you're wanting.  I've attached an example of what I mean.
    Note: When looking at this VI, there are a few things that the downgrade process did to the VI that I would not recommend for these TDMS files.  It added a 1.0 constant on the TDMS Open function, and it set "disable buffering" on the TDMS Open function to false; you can get rid of both of those constants.
    Message Edited by AndrewMc on 01-27-2010 11:21 AM
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    digitalconvert.vi ‏13 KB

  • How to write a driver for custom hardware on a digital port

    Hi,
    I am a complete newbie to LabView and so I hope that someone can hint me to the information I need.
    At the moment, I am completely lost.
    I have the CVS-1454 which has a digital I/O port.
    Now I want to plug a custom made converter on this port to convert the digital port into 4 RS232 ports.
    The hardware is not the problem, but how do I write a driver for my box?
    Is there some kind of tutorial on writing drivers available?
    All I found in the official documentation was that you can write your own drivers, but the link to the page which should give more information was invalid :-(
    Thank you for reading and have a nice day,
    FReAK

    Frankly, what you're attempting to do may be beyond the capability of both LabVIEW and the digital I/O. At the very least, it's going to take quite a bit of work. On the transmit side, you're going to have break down characters into binary and then transmit them at a pretty precise rate. I'm not familiar with the CVS-1454 but a lot of digital I/O on NI devices is not hardware timed. Using software timing is going to be risky. You have the same issue on the receive end - just in reverse. I think that if I was forced to convert some digital I/O to serial, I'd try to use commerical parallel to serial converters. The digital I/O is similar to a parallel port and the converters handle all of the conversion, timing, and handshaking for you.

  • Single virtual channel with multiple digital ports

    Hi all,
    I have created a program that creates a task to read continuously from 3 digital port lines from the same device (PXI-6133). I am trying to figure out how I can retrieve the data from each port line to put into a waveform graph. Currently, I am using the DAQmx Read instance with "1 Channel N Samples" but I get a waveform with all values at the same time or a waveform graph with all three lines transposed.
    I am using Windows XP and LabVIEW 8.6.
    Appreciate any help!
    Solved!
    Go to Solution.

    Hi Matt,
    Thanks for your reply. Unfortunately thats not quite I am looking for. I am sending the DAQmx task the 3 port lines that I want therefore as I have read it bundles them all into one channel by default. What I want to do is take that one channel and parse out the data of each of the 3 port lines to create 3 new waveforms to work with individually.
    After fumbling around a little bit, I was able to sort of get what I wanted. I've attached a screen shot of that portion of the program. The red circle in the bottom right hand corner is how I want to end up. I only did it for one of the pieces of data just to try it out and the conversion to string is just for me to print out what I'm working with. Unfortunately, when I look at the waveform it seems like maybe some extra 0's are being thrown in because its not the same graph that appears from the beginning (when all 3 pieces of data are transposed on each other). Let me know what you think.
    Thanks,
    julissa
    Attachments:
    LabVIEW-ss1.JPG ‏57 KB

  • Writing to serial port

    I currently send ASCII characters to a serial port. I have not errors reported back. Everything appears to be error free, except that the device that I am trying to control does nothing. The device being controlled does not send anything back to the pc. The connection is strictly a one way connection. Do you have to send a carriage return or something to get the ASCII characters to "push" out of the buffer? - Sorry I don't have access to my code at the moment.

    A portion of my code is below. What does the 'flush'
    do? I thought it just emptied out the buffer.
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier)
    tIdentifier) portList.nextElement();
    if (portId.getPortType() ==
    ortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM1"))
    .equals("COM1")) {
    try {
    serialPort = (SerialPort)
    portId.open("SimpleWriteApp",
    d.open("SimpleWriteApp", 2000);
    } catch (PortInUseException e)
    ortInUseException e) {}People get life for this crime!
    try {
    outputStream =
    outputStream =
    tStream = serialPort.getOutputStream();
    } catch (IOException e) {}So you now have two life sentences to serve.
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch
    } catch
    } catch (UnsupportedCommOperationException e) {}Sorry, three life sentences to serve.
    try {
    outputStream.write(rightString.getBytes());
    } catch (IOException e) {}You get the prize! Four life sentences from a short bit of code.
    }P.S. You should really use the COMM api for writing to serial ports.

  • Writing to serial port 1 from a PDA

    ok this program is driving me NUTS! i have this microchip which uses a certain protocol... now this protocol requires that you send it some characters in hexadecimal so it'll reset... afterwhich it'll send you a data packet containing the version of the microchip etc etc (it's an aduc812... which you can find on www.analog.com)... anyway, that's not important... i am having trouble actually WRITING to serial port 1... i noticed that doing it through an actual PC requires some sort of "open serial port.vi" which is not available in the pda version... all i have is init.vi which is apparently not enough from what i am told... i thas to be opened first... initialized next... then written to then read from... does anyone know how i can acc
    omplish this open procedure with the pda module? is that some sort of software i'm missing? why isn't it included with the pda module add on... etc etc... thank you in advance... i really need help with this so as much information as possible would be appreciated... let me know if you need further info...
    christina

    Hey Christina,
    Here is a link to a knowledge base one simply writing to the serial port from a PDA.
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=E011F478861443EFE034080020E74861&p_node=%20DZ52363&p_source=External
    Hope this helps.
    Brett

  • Writing to parallel port

    i need to be able to write to the parallel port on a desktop computer
    to control a stepper motor.  I need to be able to write logic high and
    low
    at certain pins that go to a stepper motor driver.  The writing to the
    port needs to be done so many times, or so many steps that are entered
    into the interface. Pins7 is the clock that that starts the stepper
    motor control in the stepper motor driver.  Also, pins 9 and 10 need
    to be driven low or high to tell driver wether half or full step and counter clockwise or clockwise.
    Basically i need to know how to set up my parallel port on my labtop in labView 7.1?
    I want to be able to use the write to digital I/O.vi to send the proper
    binary or hex value of an index array  to the parallel port
    to drive the motor driver.

    Hi exavier,
    Look here maybe someone else hase asked.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Digital port indicate

    Hi,
    I'm a newbie in Labview and I'd like to know how to use digital port
    1 or other
    to indicate when there's giving pulse out..?
    For example what should I add to the example of Cont Pulse Train-Easy
    (DAQ-STC) VI..?

    What do you mean it has a pattern number 80 & 90? The vi that you included has a port width of 8 and a pattern of 9. What do you mean you want to change it to A & B? If you mean hexidecimal then "right click" on your constants, select "Format and Precision" and change them from their current floating point to hexidecimal.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Connect Digital port PFI2 to RTSI3

    i have a question about connecting a digital port (e.g. PFI2) to RTSI port (e.g. RTSI3).
    My device: PCI6731
    i have already sucessfully connected 'Ctr0InternalOutput' to RTSI0.
    Now I need a digital input to another RTSI. But I failed to do that and got the prompt message: 'Specified route cannot be satisfied, because it requires resources that are currently in use by another route.'
    Please tell me how to connect a digital input to a RTSI?
    Thank you!

    Greetings lyonco.
    This is a great question and can be somewhat of a tricky task at times.  For advice on how best to proceed, please refer to the following KnowledgeBase article. 
    Why Do I Get Error 89137 "Specified route cannot be satisfied..." When Routing PFI Lines Over RTSI?
    In the case of the PCI-6731, it appears from the routing table that Counter0 is used as a subsystem when routing from any of the PFI lines to RTSI0-6.  I hope this information helps get you on the right track. 
    Regards,
    Michael G.
    Michael G.
    Applications Engineer
    National Instruments
    Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"

  • Dumb question: Difference between Digital Port versus a Digital Line?!

    Hello All,
    PLEASE excuse my numbskull question, but I can't find an answer to this question. What is the difference between a digital port and a digital line? I need to control some relay modules in our 2345 box. This works with digital line output, but I can also trip the relays using a Port write.
    Any recommendations?
    Thanks for all your input.
    Max

    Hello,
    There are a few different ways that you can control your digital lines.  You can use the DAQ Assistant or you can program by using the DAQmx VIs that the DAQ Assistant uses to generate its code.
    Either way you will need to write to a digital line so your lines will need to be configured as digital outputs.  There are a few good examples that you can use that are installed with LabVIEW.  You can find these examples by opening up the Example Finder (Help>>Find Examples) and then browsing to Hardware Input and Output>>DAQmx>>Digital Generation.>>Write Dig Chan.vi.  This example shows how to write the different lines on a port.  You can also choose to write just one sample instead of N Samples.  Depending on your situation you can change the polymorphic instance of the DAQmx Write VI and also change the line grouping constant from "one channel for all lines" to "one channel for each line" if you want to write in a different way.  But you can at least start with this example and make any changes you like down the road.
    Have a good day,
    Brian P.
    Applications Engineer

  • After updating latest security update for my OSX 10.7.5 one of my usb port is not working now.how do i know what is cause that usb port is not working after security update

    one of usb port in my macbook pro havent work after i ve updated latest security update for osx 10.7.5, how do i know what is cause that usb port is good or bad

    On a Mac running v10.7.2, the only way to reinstall Safari is to reinstall OS X using OS X Recovery.
    Safari 5.1.1 is for Snow Leopard. It will not run on a Mac with v10.7 installed.

  • Write to serial port and digital port at the same time

    hello,
    I need to write to the digital port and the serial port at the same time. Right now I have the two vi's (to write to the serial port, write to the digital port) in the sequence structure. First I write the digital port, then write the serial port. Using the oscilloscope, the interval between these two executions is 10 ms; and I need to reduce this interval to as small as possible. I would appreciate help in any way. Thank you.

    Hello;
    This is a little tricky. Since the transition from one sequence to another is completely Software timed, and windows manages all tasks that are running at one given time, there isn't a method to reduce that transition time.
    The most you can do is try to optimize your code so all the time expent on the transition is due only to the task management.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • How do I create a ringtone?

    I downloaded itunes 7.4 I can NOT find the option to create a ringtone. Some help please. thanks bruce

  • I cannot upload attachments to e-mails. When I click on browse in the attachment pop up nothing happens

    I cannot upload attachments to e-mails. When I click on browse in the attachment pop up nothing happens, I cant even type in a document address in the file location box == This happened == Every time Firefox opened == I downloaded the latest version

  • Master-Slave Problem: Please Help

    I am having a problem getting master/slave repositories set up for synchronization. My MDM server environment is Solaris with Oracle 10.2 database. MDM version is 5.5.41.58 (5.5 SP05). I create a repository. I unarchive my data into it. I create a sl

  • Not able to use window.addEventListener method in JSLink javascript

    Hi, I have developed 2 app parts and passing values between them using post message utility of windows. It works fine from script editor web part but fails when I am trying to use it as JSLink. I am getting window is undefined error message. I was wo

  • Lion and Amazon

    Since upgrading to Lion I'm having problems making purchases from Amazon UK. Once the order is completed it asks me again for the delivery address. Once I've done so it restarts the ordering process from the beginning. Once completed, it again asks f