MATLAB 6509

Hello

I use Matlab 2008A to control a NI USB -6509 . 2008 has come bundled with 6509 support out of the box, so as suggested here:
http://www.MathWorks.com/support/solutions/data/1-68VOCU.html?solutio...

I added the following to my $MATLABROOT\toolbox\daq\daq\private\mwnidaqmx.ini

[USB -6509]
hasAnalogInput = false
hasAnalogOutput = false
hasDigitalIO = true
digitalPortSize = 8,8,8,8,8,8,8,8,8,8,8,8
digitalPortCap = 3,3,3,3,3,3,3,3,3,3,3,3

I can connect to the device and if I use the low level functions, I can add all the rows of ports (12 ports each with 8 lines).

However, things don't work as expected. Now the main problem is that:
If I write for port2/line7 (marked 1 on the diagram of port OR) so this also seems to send the signal to port5/line7 (labeled 2). So, it's as if the lines 1 and 2 are completed. This seems to work down to 3 and 4 are also crossed. I don't have a hardware problem because the test utility AND works very well. In addition, it looks like line numbers 11 do not work. It makes no sense to me.

As an alternative, I'd be happy to try to code this in Python. I have a code which appears to connect to the card, but gives me an access violation when I try to read and write to it. I can post this code if someone is a Python whizz. Also, if anyone has examples of code for Python work dio send it my way.

Thank you!

Rob


Tags: NI Hardware

Similar Questions

  • No version of Matlab works on MacOS Sierra

    The MathWorks has published a statement recommends do not update until this problem is fixed. Why we still have the same problem with Mac OS, updates every year? MATLAB is a software more used for engineering! (<-this is a very important field of knowledge.) I don't want to even look upward to the other programs that I need! Now, we will all wait to update until this problem is fixed.

    framework for an operating system may change to reflect the changes made to the features necessary for the developers of the operating system to enable new features. General rule, Apple makes their software available to other developers to make changes to allow their software to work. It's their responsibility if they would like to do, not apples.

  • Do not open attachments MATLAB in TextEdit

    I understand how to set type on a Mac applications. However, there is a problem.

    When I receive an email with a ".m" (MATLAB) file, it should open in TextEdit (on a Mac) because this is the app that I put on my machine. I also put types strangers and plain text to open with TextEdit. But Thunderbird opens a copy of the message in another window and includes the ".m" as an attachment file. He seems unaware that the default is set to TextEdit.

    If you open Preferences(or AppMenu/Options/Options)/room detached/Incoming, there's an entry for ".m" content type files for this? If so, delete it by clicking on the drop-down Action, OK, restart TB, double click on (open) a ".m" attachment and set up the application by default for files ".m"; If TextEdit does not appear, click on the dropdown menu 'Open with', other... and locate the TextEdit program.

    On my Windows 7 system, the default text editor is already available as a default program to open attachments ".m", and the attachment is "inline" displayed in plain text.

  • New MacBook (12 ", towards 2015/2016) and MATLAB

    Hey everybody,

    does anyone have experience with the new MacBook (2015/2016) and MATLAB?

    I am currently using the MacBook Pro now after 6 years I want to something new, but I'm quite bad if I have to buy Air or the new one (1.3 GHz dual-core Intel Core m7, Turbo Boost up to 3.1 GHz, 8 GB memory SDRAM 1866 MHz LPDDR3, 512 GB PCIe-based embedded flash storage Intel HD Graphics 515).

    I am a student of neuroscience so I use matlab x times per week as well as spss, otherwise its all the usual stuff (office, senseless surfing the internet, average of much netflix etc.). I will still use my Pro, with a new hard drive, but carrying 2kg of Mac around campus is horrible.

    I regret the new 12 '' MacBook?

    Thank you!

    See you soon

    Magda

    I use the new Macbook and Igor Pro that is similar in the CPU usage and data processing capabilities. I also have a 15 inch MB Pro, which is a pain to lug around... you will be happy with the new Macbook and don't suffer from the "slower" processor if only using MATLAB.

    One thing to keep in mind is that there are only two hearts, then if you don't have any parallel treatment (whether through Matlab or other calculations) they will be slower. If you do not I recommend the Macbook.

  • E/s PCI-6509 direction bit by bit

    I am writing to the low-level code to use the card PCI-6509.  I already did it for the PCIe-6509.  However, the code DDK, I downloaded doesn't seem to allow me to select the input/output direction of an individual bit... it seems to be in groups of 8 - bit only.  My understanding is that the PCI-6509 Board is supposed to allow individual control, I/O direction (as does the Commission PCIe).  Can someone help me.

    Thank you.

    Hi Jwstonge

    Unfortunately, the 6509 PCI Variant can be configured port-to-port, not line-by-line.

    Ce Ko gives a list of what devices are supported online configuration.

    The PCIe-6509 is built on a different architecture than the other form factors.

    Kind regards

    Luke B.

  • Localhost UDP connection between FCR and Matlab

    Hi all

    I have a question about the connection between Matlab and FCR UDP. My idea is to Exchange data between Matlab and Labview on the same computer.

    So I found the 'UDP Simple' of the FCR 2.0 sample project where periodically a datasample is generated randomly and sent to the remoteport 61557 local host. In the project a 'fractional number of string for transmission' is used for the transmission of data. The receiver of the sample project reads from the same port to receive the datasample.

    Now, I'm interested to read this simple stream from Matlab (just at first), however, it does not work and I'm not sure why. What I do in Matlab is the following (code Matlab)

    delete variables;
    u = udp ('127.0.0.1', 61557); % Of installation UDP Object
    fopen (u); open reading port %
    A = fread (u, 1);  % read an element
    fclose (u);

    With this code, however, I get a timeout by saying: "' WARNING: unsuccessful reading: the amount of data specified has not been returned within the time limit." "

    I'm not sure why this happens, maybe you could help me out here? I guess that the formet serving to VCF is not the same as in Matlab? Maybe the Terminators are not the same?

    See you soon,.

    Steve0

    Hey

    So, regarding the problem actually, I found the solution today. It was not the firewall, but a simple configuration in Matlab seting the UDP port. So the side of Matlab, to change the definition of udp object according to

    u = udp ('127.0.0.1', 'Thelocalport', 61557);

    If you have

    u = udp ('127.0.0.1', 'Thelocalport', 61557);
    fopen (u);

    A = fread (u)

    fclose (u);
    Delete (u);

    Who does the trick and you can read from the port. Then of course you say Matlab that you read from the "LocalPort" x, which I wasn't aware of.

    On the transmitter side, you simply:

    u = udp ('127.0.0.1', 61557);

    fopen (u);

    fwrite (u, '1');

    fclose (u);
    Delete (u);

    Here, you set just the port of transmiting.

    About the format of the data: I used the simple UDP protocol streaming Comms project where a random number is generated as a double, transformed into a string (ASCII values) and transmitted. At the level of the receiver, you get as much the UDP packet with the ASCII values that you must turn if you want to find the number.

    I hope this helps anyone having the same problem.

    See you soon

  • Using a neural network with box Toolbox MATLAB in LabView?

    I would like to know how to train a neural network in Matlab and use it in Labview? I know I should be using the MathScript, but as I do once the network formed in matlab is a dull file?

    Hi GringoButzlaff1,

    Well, it's not all MATLAB code/script that can run in LabVIEW using MathScript.

    If there is a function of IP (intellectual property) in the code, that is, any Toolbox MATLAB functions, you won't be able to execute it using the MathScript.

    In fact, you must call the MATLAB script node in your code. This node calls the script software MATLAB server to run scripts written in MATLAB language syntax and are only available for windows.

    Try encoding using the MATLAB script node and tell me if it worked for you.

    Best regards.

  • How to access the counters in cDAQ9174 / NI9403 with C / Matlab

    Hello

    I read that the cDAQ9174 has four available counters. However, they need to be interfaced via another card and they are now directly available to the user. How do I with e/s digital NI9403 card? How could I do with LabVIEW but with C/Matlab?

    Thank you

    Jan

    Hello, Ulysses,.

    normally all modules with the DIO 8 inputs or less.

    Connections of signals C series for counters

  • PCIe-6509 register level programming: cannot access the ASIC slave

    I'm running one of the RPL (boardBringUp.cpp) examples using the RTX operating system.

    The program crashes when I try to access the STC3 ASIC "slave".  When I try to read the signature ASIC slave when I try to access the OID or ports starting at port 6 which is the first port on the slave STC3.

    Any ideas on what to try?

    I just noticed that the RTX operating system layer was not modified to work with the PCIe-6509. The layer of the operating system allocates only byte 0 x 40000 for retgisters of the card. The problem is that the notebook for the STC3 slave register is 0 x 40004, the origin of the problem. You can change the osiUserCode.cpp to allocate more memory to bar0. I recommend 0 x 80000.

    Thank you

    Steven T.

  • The value of the seed of the generator of random numbers in Matlab node

    Hi all

    I need to use random variables inside a Matlab Labview Commsuite node. I generate with the randn() function. Is it possible to put the seed of the random number generator such as the random numbers are reproducible?

    Hi Steve,.

    You can use randn ('seed', seeds) to initialize the random number generator. The seed must be a positive integer value. For example, randn ('seed', 3). In addition, this seed is global within the entire application. This means that if the randn() function is called MathScript multi-node that could run in parallel, random results are not guaranteed to be the same after you change any part of your code. But you should always get the same results for repeated passages of the same code.

  • Eval commands and Matlab num2str

    All,

    I searched all the 12 pages of this forum and this solution is not found.  If this is a repeat, I am sincerely sorry.

    I try to use the MathScript matlab Module "eval" and 'num2str' orders.  For example:

    II = 01:10;
    eval (['w' num2str (ii) ' = ii ;']);])
    end

    The problem is that 1) it says that it will slow down the program (I get only) and 2) it does not seem to run the script.  I'm looking for some 'w' matrices/vectors/scalars as output.

    In addition, as part of the script that I have other variables that I would use as output.  When I try to add them, labview stipulates that: "you must set this variable in the script and then set its data type. I get the output variable: right click--> Add out--> click variable.  Even variables that are not used in the script I want to pass give the same error.

    For example:

    input variables x = y z

    II = 1:x

    eval (['y' num2str (ii) ' = ii ;']);])

    end

    output (by above method) variables will show all three, but even with just passing through "z" I get this same error.

    This error does not appear when I do basic math in the node and pass the unused variables.

    Ideas, suggestions, solutions would be appreciated.  If necessary I can post some of my code; However, I gave the relevant information above.

    Best,

    Corbin Walker


  • MATLAB script node error: 1046

    Hello world

    I now use Labview for data acquisition and want to use MATLAB
    function of node script to do the work of image processing.

    I have some problems get MATLAB script to function properly. The
    It is:

    Whenever I tried to run the program, Labview gave me the following
    error:

    "Error 1046: Labview does not initialize the script server, make sure that the server software is.
    installed. »

    However, MATLAB is installed in the PC. I think that the reason of
    This error is that I'm using a PC based campus University. I got into this PC MATLAB is a network
    versioned. (i.e.
    installed on the network server, but not in the local hard disk).

    Is that what I can do to work around this error?

    Kind regards
    Kent

    Hi hykwei,

    Unfortunately, it is not possible to obtain the MATLAB Script nodes to work
    LabVIEW under your current network configuration. So that the
    Node MATLAB Script to work properly, it takes that MATLAB is
    installed on the same machine as LabVIEW. This means that you will need
    either install MATLAB on the local computer on which you apply
    LabVIEW or you need install and use LabVIEW in the same
    Server computer where MATLAB is installed. Function of MATLAB
    feature, you may be able to make some sort of minimum installation on the
    local machine that adds MATLAB to your registry and program files list,
    but who sends you right to the copy of MATLAB on the network.
    However, I am not aware if it is still an option or how you could go
    on the implementation of this scheme, so if you are interested, I would contact with
    MATLAB for more on this topic.

    Kind regards

  • Import MATLAB generated the file ascii in the Analog Waveform Editor

    Hi all

    I tried to create signals by the Analog Waveform Editor. I have some Waveform generated from MATLAB and recorded as ASCII files, following the instructions on this Web page OR, but it did not work properly. For example, if I produce a column to fill with 0.5 and import the file into the analog signal generator, all I get is a huge series of random number. I missed a few steps in the import of the waveform?

    Thank you!!

    Just for your reference, I could almost in half the size of your file just by saving as .hws. Also to answer your last point, you may have issues opening / importing your .txt file because it may have been opened in another program at the same time. Make sure that you have closed it in Notepad or Excel or other programs which may still be locking on the reference.

    Kind regards

    Jason L.

  • Individual access to the inputs and outputs on a single port (PXI-6509

    Hello

    I use PXI-6509 and this sentence taken from the Manual:

    "You can use each of the DIO lines as the input to a digital static (DI) or digital output (DO) line"

    leads me to believe that each individual DIO can be defined as input or output (even within ports), but picture:

    shows that these ports can be defined as inputs and outputs in the same port.

    On another card 6284 with DIO, I can put them individually.

    Can someone confirm that the 6509 is correctly?

    Best regards

    Adrian


  • USB-5133, hws file matlab

    Hi all

    I use USB-5133 to measure voltages of both channels simultaneously. For this, I use the NO-SCOPE. The scope record measured as a DJ-file data. I need these files in Matlab, but I can't open them. What would be the easiest way to export and to open these data in Matlab?

    Any help is greatly appreciated!

    Joonas

    I've never used Matlab, this will probably not be able to help much.  However, NEITHER-HWS uses HDF5 1.4.4 version which was released around 2002 or 2003.  The current version of HDF5 is 1.8.5.  I think remember me some problems of compatibility with 1.4.4 but it has been a long time and I don't remember the details.  Hdf5 recorded the version of the writer in the file to allow compatibility downstream, and the HDFView doesn't seem to have a problem with the file (I was able to trace the track without any problem in the Viewer).  You may need to define a compatibility option in your read file.  See your documentation.

    Data, stored as an array of I8s, are one of the two places (there is only one copy of data, but it is related to two places):

    wfm_group0 / vectors / vector0 / data

    wfm_group0 / traces / trace0 / axis / data_vector / data

    The coefficients of the scale for the data are stored in

    wfm_group0 / traces / trace0 / axis / scale_coef

    It is an array of point numbers floating 64-bit with shift first, followed by the scale factor (0,1,...).

    Timing information in the attributes of the x axis:

    absolute timestamp - wfm_group0 / traces / trace0 / axis / ref_time

    first point against the benchmark of timestamp - wfm_group0 / traces / trace0 / x axis / start

    vesting period - wfm_group0 / traces / trace0 / x axis / increment

    Good luck.  My apologies for not having more help.

Maybe you are looking for