Output of MatlabScript in the matter of the loop

Hello everyone, but long time reader first time poster, and I was wondering if I could get help to a little problem here, or... Well, more like a question and not a problem.

I don't download the .vi because I don't think it will be necessary, in addition, ignore the rest of the image (I just play with image processing like I taught him) and go to the location of the matlab script.

My goal is to represent the image (taken from image data) bit and in the end, it must look like to... a table of 8 columns and all the lines she might need (can't see all of the lines of course) so it will look like a matrix.

For example, it should look a bit like this on the user Panel
| 1. 0 | 1. 1. 0 | 1. 0 | 1. (first 8 bit value)

| 1. 0 | 1. 1. 1. 0 | 1. 0 | (8-bit second value)

etc...

So for that, I use the matlab de2bi function and the release of this part is where my problem is, im putting out 8 columns representing each number comes from the image and well, im confused as to what is going out of the matlab function and the loop, as you can see in the picture I have uploaded, I put a flag in the output of 'bin '. , was automatically called Real, inside the loop and the other digital, outdoors, also, I disabled the index of the tunnel in this output. (if I activate the index, it comes out as a table)

I thought that Real and Numeric to be showing the same thing, but when I run it, which doesn't seem to be the case, you Real shows the 1 and 0 (I guess it shows the 8 bits because it shows figures but I saw in the matlab command window and there are 8 bits stored in 'bin') and digital remains just at 0 its almost as if nothing were happening out of the loop, and because I'm not sure what it is falling I can't really find a way to show the bits as in the example, I said before.

Read the help of de2bi, it is said that his exit is a matrix if the input is a vector, but I don't think it's a vector since due to the loop, it takes value by value, then it must go to the default (in binary) value too...

Thanks for the help in advance, in addition, whether something else to better understand my problem please say so and I will do my best to make it easier to understand.

I don't know why you're so obsessed on matlab, LabVIEW can do all this much simpler directly. Here's a possible solution. (LabVIEW 8.5. For other possible outputs you could reverse the Boolean array, so modify them.).

(Your main mistake under matlab is that your output of matlab is defined as a scalar value, then it should be a vector. Your tunnel to exit of the matlab node has the wrong data type.)

Tags: NI Software

Similar Questions

  • Output settings reset inside the DTS sound

    So the C series + ugly + built in the Strait, we all know. No matter, like home, I run my sound through some nice speakers and on the road I use headphones. However, to get a good sound, I pass parameters DTS from inside to outside. And voila, sound quality.

    However, DTS settings reset internally, forcing me to change it manually every time. Not the biggest problem in the world, I'm okay, but still annoying.

    Anyone has an idea on how to change the default setting on the outside? See you soon!

    If there is no definition of this option is enabled by default, so I guess you should choose external, output noise always using the DTS sound profile.

  • output hsl colors in the code?

    is it possible to output hsl colors in the code rather than RGB colors? I noticed that you can select colors STL, but no matter how many times I've selected hsl code always uses the RGB color values? any ideas?

    Hey, thanks for this note. In fact, we have this problem with most types of color of switching when will say RGB HEXADECIMAL. We have this in our backlog, and I made a point that we are sure to add the TSL values as well. Thanks for the comments!

  • Why my sample rate does not match the output of timestamps in the waveform?

    Hello

    I run a simple application to read the data of two pressure sensors output signals 0 - 5V to a NI9215 module, and one connected to the 9237 module load cell. They are housed in the 9172 chassis.

    I am new to DAQ and labview, and I find it difficult to reconcile the sampling frequency that I put in the sample clock and the apparent rate data (according to the timestamps in the waveform that I output to a text file). For example, if I ask 100 Hz rate (and 10 samples to read), the data appear to sample at 1612,9 Hz. If I ask the sampling frequency of 1000 Hz, outgoing data is 1612,9 Hz to 20 kHz, the data came out to 25 kHz.

    Can someone tell me to trust the timestamps given in the waveform that is written in the text file, and if there is a way to check this?  If this timestamp is correct, how can I force the application of sample data at the requested speed?

    As a secondary issue, in my attached VI, you can see that I have an attached to an array of construction shift register. I can't understand how to initialize the array outside of the loop as it clears the table before the next time I run the program. Any advice?

    My VI is attached.

    Thank you

    Claire.

    Hi Marc, thanks for the quick response and the right explanation. It's all much more clear now.

    Have a great weekend,

    Claire.

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

  • Change the shape of the output signal without initializing the new process of output signal

    Hello!

    How to change the shape of the output signal produced on the output channel without initializing the new process of output signal?

    Thank you

    Yes, you can do the same thing without count/killing the task all the time.

    Attached VI shows how to use redeclenchables AO in the same way, using a meter like time base for the AO.

    Please note that attached VI uses the same Subvi as in the example you posted before.

    Christian

  • Output voltage continuous to the DAQ card provides a discrete signal

    I'm looking at the exit of a continuous decaying signal as shown below.

    (For now, let's assume that I must leave the Fs sampling frequency: 1000 and #s: 1000)

    In the loop where the signal is generated, I inserted a block 'Wait (ms)' so that iterations would maintain the good timing. If this is not the case, the speed of the iterations would be too fast. Although, when I measure the output to the BNC connector, the actual output is in discrete steps, which depends on the speed of the iteration. (for example, for the signal preceding with freq = 1/4 Hz, the result would still be 1V for two seconds, 0, 5V for a second and 0V for a second, then repeat)

    Is it possible to fix this?

    Before I tried this method, I had used the output of Wizard DAQ, which had no need of me having to insert the "wait (ms). But the problem with this method is that there is a delay between when the program has sent a message and when the output BNC connector has received the signal.

    I guess that the second method not released by discrete steps due to the buffer that is maintained in the wizard. I tried to have some sort of buffer to the first method, but could not because of lack of experience, I guess. If I could also, it seems that I could introduce a delay once again, which is undesirable.

    Any help on this would be appreciated. I will attach a copy of the article that gives me bad.

    Thank you.

    Mike

    As I said, the filter must be set up the EQUIPMENT. Just as an anti-aliasing filter on an analog input must be done at the hardware level, so a reconstruction on an analog output filter must be implemented in hardware.

    Sometimes robust filtering is necessary, but in general a simple RC works very well. Google 'Filter RC' or "low-pass filter" to get examples and design equations. Often the hardest part only is coming with good places for mounting of all.

    Mike...

  • Update of unique value in the loop voltage output?

    Hello

    I'm trying to use the DAQmxWriteAnalogScalarF64 function to produce a voltage constant and regular say 3V.  The program will be in a loop, and after each iteration, I would that the output voltage be increased to say 0.1V.

    So, a shortened version of my program looks like this

    float64 value = 3;

    DAQmxCreateTask

    DAQmxCreateVoltageChan

    DAQmxWriteAnalogScalarF64 (TaskHandle taskHandle, bool32 autoStart, float64, float64 value, timeout, bool32 * reserved);

    Loop

    {

    DAQmxStartTask

    DAQmxStopTask

    }

    Now of course who does not help me update the output voltage after each loop.  So I tried something like this:

    Loop

    {

    DAQmxWriteAnalogScalarF64 (TaskHandle taskHandle, bool32 autoStart, float64, float64 value, timeout, bool32 * reserved);

    DAQmxStartTask

    DAQmxStopTask

    value = value + 0.1;

    }

    My computer would crash when I try to run the program.   I have to erase and create the task in each iteration too?

    I try to avoid using the DAQmxWriteAnalogF64 function, because I need to use a sample clock in time, he and my sample clock is used for the other channel of analog output.

    Thanks for any input.

    Howard

    aNItaB,

    I tried to call the DAQmxWriteAnalogScalarF64 in a loop and freeze my computer completely and I have to restart it by pressing the Start button.

    Then, I tried to use the DAQmxWriteAnalogF64 in a loop, specifying the output as an array of one element array, and then to update an element at the beginning of each loop.  This seemed to have solved my problem for now without any computer breaks down.

    A strange thing happened was when I took your suggestion and took the StartTask and StopTask out of the loop, the computer crash problem appeared again.

    in any case, I think that my problem has been resolved, thank you very much for your responses timely and sincere help.

    Howard

  • Output video HDMI to the TV is fine, but audio not transferred to the TV

    HP G60-440US Notebook PC, Windows 7 32-bit. Laptop connected to LED TV via HDMI cable. Video output from the laptop to the Tv is perfect, but the sound is in the laptop speakers (NO SOUND OUTPUT OF TV). The play sound icon does not appear on the click with the right button on the VOLUME in playback devices. I've updated all the possible drivers and BIOS. Help, please

    Thank you

    Hello

    Check the document below:

    Connect a TV or monitor to your Windows 7 PC using HDMI

  • Output 2 sound at the same time cards

    I have many reasons why I won't release of multiple sound cards at the same time. I know I'm not the only one who has this problem based on some quick searches of bing.

    I would like to be able to output sound sound at the same time instead of having multiple cards to change the "default device" in Control Panel audio all the time I want that they ALL as default device. I want to use my USB headset and speakers at the same time. I know that windows is capable of this because if we play I can "test" each other, and they both play a sound at the same time

    As far as I know there is simply no setting for it. Help, please!

    Hello
     
    Unfortunately this does happen, as it is by design,
     
    Here, a single device can be marked as default device, follow these steps below for more information.
     
    1. click on start, type Sound in the box to start the search.
    2. click on sound in the results of search at the top of the start menu.
    3. click on the tab reading notice the check mark next to the default device.
     
    As it is a design problem, there is nothing we can do from our end.
     
    If you want to suggest changes in the design here is the link you can make reference to: Microsoft Connect - back products and bug reports. Microsoft...
     
    https://connect.Microsoft.com/dashboard/Info/

    Thank you, and in what concerns:

    I. Suuresh Kumar-Microsoft Support.

    Visit our Microsoft answers feedback Forumand let us know what you think.

  • HP 1212 was dark on the output lines when using the charger

    My HP1212nf printer gets dark on output only lines when the charger is used.

    It should be little dust somewhere.  Be sure to thoroughly clean the area mentioned Bob.

  • CANNOT OPEN OUTPUT FILE, CANNOT DELETE THE OUTPUT FILE

    Try to patch effect for Deskjet 722C for Windows 7.  Not able to replace the existing .dll files.  Error messages: could not open the output file, cannot delete the output file.

    Thank you for your response.  I found these solutions but still had problems.

    However, I was able to bypass Windows with a DOS command that did the trick.

    C:\Windows\System32>copy C:\temp\hpvdb720.dll C:\windows\system32\spool\drivers\x64\3

  • Is there a way to create multiple BQY output to one of the Job file?

    Hello

    I use the EPM11.1.2.3.501 version.

    BQY report because of the large amount of data, it is difficult to use WebClient.

    Then share on a quarterly basis.

    However,.

    If change is to occur, there are difficulties must edit each file.

    For example,.

    Save the task BQY for 4th quarter 2014, 2014 3 q, 2nd quarter of 2014, 2014-1 q.

    When you run the task, the output of the work file is created.

    If the work file is changed, you must change all four files.

    This will not be growing creations.

    Is there a way to create multiple BQY output to one of the Job file?

    Please help me.

    Thank you

    It is not possible to have several BQY out in a work file.

    Thank you

    KK

  • How to generate an output PDF report when the layout template is an Excel file in the editor of BI 11.1.1.7

    That's what I did...

    1. create the new report

    2 create a report using an existing data model (browse and choose a data model)

    3. How do you create your report? (click used report editor)

    4. click on finished (and then saved the report)

    5. then he asked me to create the page layout (I chose to download or generate a layout and then traveled to a downloaded my model with XDO_ * the columns of the excel data model mappings)

    Template file = model Excel, locale = English (United States)

    5. click on Upload

    6. then click view the report top-right, which has opened my file name of "my_report_layoutname.xls" with sheet report 1 (OPE all mapped very well) and a sheet of xdo_metadata.

    I just wanted to step 6 is a sheet 1 pdf report.    How do I do that?  Could not find the place where I can clarify that.

    Mr. Jamal

    Layouts Excel generate only one exit Excel. (CSV takes no account of the provision is therefore an option for any layout.)

    You use RTF or PDF or page Template Builder (XPT) layouts to generate PDFS.

    The LOV to find output formats by modifying the report and selecting a list.

    The table has a column to the output formats, it is controlled by the format of the presentation that you have built.

    Kevin

  • why there is no output after execution of the procedure

    Hi all

    SQL > set serveroutput size 1000000

    SQL > set echo on

    SQL > set comments on

    SQL > declare

    2 number (19) n;

    3 v_startday varchar2 (100): = ' 01 /' 07/2013;

    4 v_owner varchar2 (100): = "SLIMSINTDM";

    5 v_audit_tab audit_var: = audit_var();

    v_table_name 6 varchar2 (40);

    7 type cur_type is ref cursor;

    8 v_cur cur_type.

    v_first_name 9 varchar2 (100);

    v_last_name 10-varchar2 (100);

    11 v_out_tab varchar2 (100);

    v_lab_code 12 varchar2 (10);

    13 v_sql varchar2 (20000);

    14 v_sql_1 varchar2 (10000): = q']

    15 select distinct au.first_name, au.last_name,.

    16: v_table_name table_name, lab_code

    Lab 17 l

    18 join aus app_user_security on AUS.owning_lab_id = l.lab_id

    19 join app_user AU AU. APP_USER_ID = AUS. Join APP_USER]';

    20 v_sql_2 varchar2 (10000): = q'[t on (t.ADDED_BY = to THE.)] APP_USER_ID

    21 or t.last_modified_by = au.app_user_id)

    22 where lab_locale = 'en_AU '.

    23 and (t.added_date > to_date (: v_startday, "MM/DD/YYYY"))

    24 or t.last_modified_date > to_date (: v_startday, "MM/DD/YYYY"))

    25 order by last_name, first_name

    26     ]';

    start 27

    28 n: = 0;

    29 because me to (select table_name from all_tables where owner = v_owner order of table_name)

    loop 30

    31 v_table_name: = substr (i.table_name, 1, instr (i.table_name, '_JN') - 1);

    32 - dbms_output.put_line ('v_table_name: ' | v_table_name |'; i.table_name: ' | i.table_name);

    33 v_sql: = v_sql_1 | i.table_name | v_sql_2;

    34 - dbms_output.put_line (v_sql);

    start at 35

    36 open v_cur for v_sql using v_table_name, v_startday, v_startday;

    37 loop

    38 extract v_cur in v_first_name, v_last_name, v_out_tab, v_lab_code;

    39 exit when v_cur % NOTFOUND;

    40               n := n + 1;

    41 v_audit_tab.extend;

    42 v_audit_tab (n): = audit_type (v_first_name, v_last_name, v_out_tab, v_lab_code);

    43 end loop;

    44 close v_cur;

    45 emergency

    46 then than others then

    then 47 cases sqlcode = - 1030 - insufficient privileges

    48 dbms_output.put_line (' no privs to ' |) THE USER | "on" | i.table_name);

    49 exit;

    50 end if;

    51 end;

    52 end loop;

    53 x in (select * from table (v_audit_tab))

    loop 54

    55 dbms_output.put_line (x.first_name |) «, » || x.last_name | ',' | x.table_name | ',' | x.lab_code);

    loop end 56;

    end 57;

    58.

    PL/SQL procedure successfully completed.

    Issue in this case, developer you can't find any (results) output as expected after the execution of this procedure, so is there something wrong?

    Thank you very much.

    When you try this below is query it returns all the lines?

    Select table_name

    from all_tables

    where owner = "SLIMSINTDM."

    order of table_name;

Maybe you are looking for