Refresh ListField and store multiple entries

I'm having a problem trying to get my program to save the information. I recently ended show him an entry but I don't think that im doing something because it shows just the same entry over and over again.

Im trying to to save all fees in the form of spending and then display them in the WelcomeScreen listbox. I'll include the store file, welcomeScreen and booking fees.

What would be the best way to store this information and display them in the listfield? Also when you return to the WelcomeScreen how can I have the update so the listfield is updated?

WelcomeScreen:

package moneyMasterApp;

import java.util.Vector;

import net.rim.device.api.system.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.decor.*;

public class WelcomeScreen extends UiApplication implements StoreResource {
    //Declare Variables
    //create a button here with the text 'Submit!'
        //ButtonField.CONSUME_CLICK will prevent the Menu from showing up when the user clicks the button.
        ButtonField btnDeposit = new ButtonField("Deposit", Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
        ButtonField btnExpense = new ButtonField("Expense", Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
        UiApplication nxtscreen = UiApplication.getUiApplication();
        HorizontalFieldManager _FieldManagerTop;
        LabelField myTitleLabel;
        BitmapField bitpam = new BitmapField();
        Background bg;
        LabelField label = new LabelField("Please Select Action:");
        FieldListener listener = new FieldListener();
        private static Vector _data;
        private static PersistentObject store;
        private ListField ExpenseList = new ListField();

    public static void main(String[] arg) {
        WelcomeScreen app = new WelcomeScreen();
        app.enterEventDispatcher();
    }

    public WelcomeScreen() {
        MainScreen mainScreen = new MoneyMakerMainScreen();
        //Set the title of the screen
        mainScreen.setTitle("MoneyMaster");
        //Add labels and other items
        _FieldManagerTop = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL);
        myTitleLabel = new LabelField("MoneyMaster");
        bitpam = new BitmapField();
        bitpam.setBitmap(Bitmap.getBitmapResource("bbicon.png"));
        _FieldManagerTop.add(myTitleLabel);
        _FieldManagerTop.add(bitpam);
        bg = BackgroundFactory.createLinearGradientBackground(0x2ebaeb, 0x2ebaeb, 0x7cbaed, 0x7cbaed);
        mainScreen.getMainManager().setBackground(bg);

        synchronized(store) {
            Vector _data = (Vector) store.getContents();
            int count = _data.size();
            ExpenseList.setEmptyString("Nothing", DrawStyle.LEFT);
            ExpenseList.setSize(count);
        }

        ExpenseList.setCallback(new ExpenseListCallback());

        //Add objects to screen
        mainScreen.add(_FieldManagerTop);
        mainScreen.add(label);
        mainScreen.add(new SeparatorField());
        btnDeposit.setChangeListener(listener);
        btnExpense.setChangeListener(listener);
        mainScreen.add(btnDeposit);
        mainScreen.add(btnExpense);
        mainScreen.add(new SeparatorField());
        mainScreen.add(ExpenseList);
        pushScreen(mainScreen);

    }

    static {
        //Retrieve a reference to a persistent object
        //and set its contents to a new new vector if it is empty
        store = PersistentStore.getPersistentObject(0xe69c43e620187619L);
        //Hash of: "TechStormSolutions.MoneyMaster.Application"
        synchronized(store) {
            if (store.getContents() == null) {
                store.setContents(new Vector());
                store.commit();
            }
        }
        //retrieve the contents of the PersistentObject
        //and store in a Vector
        _data = new Vector();
        _data = (Vector)store.getContents();
    }

    private final class MoneyMakerMainScreen extends MainScreen {
        protected void makeMenu (Menu menu, int instance) {
            menu.add(deposit);
            menu.add(expense);
            super.makeMenu(menu, instance);
        }

        public void close() {
            Dialog.alert("Closing Application");
            super.close();
        }
    }

    private MenuItem deposit = new MenuItem("Deposit", 1, 100) {
        public void run() {
            UiApplication.getUiApplication().pushScreen(new depositForm());
        }
    };
    private MenuItem expense = new MenuItem("Expense", 2, 101) {
        public void run() {
            UiApplication.getUiApplication().pushScreen(new expenseForm());
        }
    };

    class FieldListener implements FieldChangeListener {

        public void fieldChanged(Field f, int context) {
            //if the deposit button is clicked
            if (f==btnDeposit) {
                UiApplication.getUiApplication().pushScreen(new depositForm());
            };
            if (f==btnExpense) {
                UiApplication.getUiApplication().pushScreen(new expenseForm());
            }
        }

    }

    final class ExpenseListCallback implements ListFieldCallback {

        public void drawListRow(ListField list, Graphics g,
                int index, int y, int w) {
            int count = _data.size();

            synchronized(store) {
                Vector _data = (Vector) store.getContents();
                if (!_data.isEmpty()) {
                    String[] ExpList = new String[count];
                    for (int i = 0; i < count; ++i) {
                        StoreInitial info = (StoreInitial) _data.elementAt(i);
                        ExpList[i] = info.getElement(StoreInitial.AMOUNT);
                    }

                    g.drawText(ExpList[0], 0,y,0,w);
                }
            }

        }

        public Object get(ListField listField, int index) {
            return null;
        }

        public int getPreferredWidth(ListField listField) {
            return Display.getWidth();
        }

        public int indexOfList(ListField listField, String prefix, int start) {
            return listField.indexOfList(prefix, start);
        }

    }
}

In my listcallback I had to change that loop and out so that the index was the counter.

synchronized(store) {
                Vector _data = (Vector) store.getContents();
                if (!_data.isEmpty()) {
                    String[] ExpList = new String[index];
                    StoreInitial info = (StoreInitial) _data.elementAt(i);
                    g.drawText(info.getElement(StoreInitial.AMOUNT), 0,y,DrawStyle.RIGHT,w);
                }
            }

Tags: BlackBerry Developers

Similar Questions

  • Where should I start with RS-232 to receive and analyze multiple signals using a single port?

    Hello

    I'm starting a new project that will have a single serial port.  I would use Labview to analyze several singles (which include two measures of temperature, two measures of pressure and a few others like two voltages, input encoder axis, etc...).

    Where should I start?  I understand RS - 232, well enough, but not too familiar with Labview.  How do I separate the entrance to separate multiple entries?

    Thank you all in advance for any help you provide.

    It is unclear what kind of separator you use between the label and the data, but if this isn't a CR, then the sequential readings should be simple enough. A VISA reading can be set to complete on a character of specific endpoint (i.e. CR) so the Read VISA would be in a constant loop then you would look on the label and if each is unique, a simple case statement could be used to assign the value to a specific indicator/table/shift register / whatever you use to display/store data.

  • Get popupscreen user input and store it in the variable

    Hello world. I have a screen that is pushed to start the application

    pushScreen (new SPScreen());

    In the constructor of the form, I push an extension of popupscreen in the stack to get an int from the user through TextField amount.

    UiApplication.getUiApplication () .pushGlobalScreen (new SplashScreen(), 1, UiEngine.GLOBAL_SHOW_LOWER);

    In the popuupscreen, I store the entry under int amount;

    public void fieldChanged (field field, int context) {}

    name = nameTxt.getText ();

    quantity = Integer.parseInt (amountTxt.getText ());

    Close();

    }

    };

    Now I want int amount; in my screen to shoot the user supplied value and whenever you click on a button Add the amount in total, each time increasing the total amount.

     

    public static int amount;

    total int = 0;

    ...

    amount

    = OptionScreen.amount;

    Total = total + amount;

    No matter how many times you press the Add button it only changes the total amount. For example, if I enter 6 as the quantity and press the button 3 times I want the total 18 years, but the total is still only 6.

    I'm sure there's probably a way to pass a reference to the variable, but I have a similar situation where I have a variable which is accessible by a certain screens and can be changed in multiple screens as well.  I delcare a class called globalVars and put the variable.

    public class globalVars {
    
        public static int total;
    
    }
    

    Do only access you anywhere with globalVars.total.

    Kind regards

    Scott

  • Lost history, bookmarks, tools, help, Back Button (previous), refresh, stop and home buttons

    Way and lost the whole 'File, Edit, View, history, Favorites, tools, help' and
    <>, refresh, stop, and the home of line.

    I can't figure out how to get it back.

    Any help would be greatly appreciated.

    Thank you.

    Raybo57.

    In Firefox 3.6 and later Windows, you can hide the "menu bar" by "view > toolbars" or through the context menu on a toolbar.

    Press F10 or press and hold the Alt key to bring up the 'Menu Bar' temporarily.

    Go on "view > toolbars" or right-click the 'menu bar', or press Alt + V T to select the toolbars to show or hide (click on an entry to switch from the State).

    See also what happened to the file, edit and view menus? and http://kb.mozillazine.org/Toolbar_customization

  • Media application store multiple copies of videos

    I have an Acer laptop with Acer Cloud installed on it and I chose to use the folder my videos in the media app Acer.

    After doing so I have foud this is to store multiple copies of the same videos in the cloud (even if I don't have one of each), why is what is happening and how can I fix?

    I fixed it by removing all videos (but not the originals) and time all the video directory. Still not sure why this happened.

  • How to extract the same song, several times using different bit rates or formats and store all the digital music files in WMP 12 default on the same HDD music library

    Using Windows Media Player 12 (w/under Windows 7), "can I ripping the same song, several times, using different bitrates & and/or formats and store all the digital music files in the music library by default WMP - 12, on the same hard drive?

    1.) #1 goal: tear up the same song repeatedly, w / "different rates" as a WMA file.

    2.) #2 goal: tear up the same song repeatedly, w / "different rates" as an mp3 file.

    3.) #3 objective: NOT to each subsequent copy (version) of the song, deleted & and/or replaced by the previous version of the song [even].

    4.) question Bottom Line Up Front--> is Windows Media Player 12 (included with the Windows 7 operating system) are able to achieve '#1 objectives; #2; & #3 above?

    5.) details/example: I want to tear the piece "Maria Maria by Carlos Santana" to my laptop as a Windows Media Audio [WMA] file.  In addition, I would like to rip the song 'Maria Maria' three several times with 3 different bitrates in format WMA; and, as an MP3 file.  Therefore, my final result wished (after the extraction process), will take place the four 4 audio files split up as follows: (a) 'Maria Maria by Carlos Santana'--> Format: file WMA; Ripped @128 Kbps bitrate.  (b) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped to the "Variable bit rate; (c) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped commissioning "Lossless." and (d). 'Maria Maria by Carlos Santana'--> Format: MP3 file. Ripped @256 Kbps bitrate.

    6.) my preference: I do NOT want to rename the file (s). {for example, 'Maria Maria by Carlos Santana' renamed/changed for--> "Maria_Maria_by_Carlos_Santana_128kbps.wma",...} 'Maria_Maria_by_Carlos_Santana_256kbps.mp3 '; etc.}.  In addition, I am not concerned about the additional disk space that will be consumed after multiple copies of the same song with different speeds of transmission and different formats.

    7.) my experience w / Windows Media Player 10 (w / the operating system of Windows XP): using WMP - 10, my goal (s) described above is not a problem at all.  Simply insert the CD purchased by Carlos Santana, containing the song "Maria Maria"... Select the desired Format (WMA; WMA VBR; WMA Lossless; or mp3)... Select the desired flow rate (WMA... 128/160/192kbps_mp3: 128/192/256/320 kbit / s; etc.) ; and click on the "RIP" button to start the copy process on the hard disk of of Carlos Santana's "Maria Maria".  This process (w / WMP-10) would result in having the same song, copied on the hard disk, with levels of quality different "audio" (via the different bit rate settings); regardless of the format (MP3/WMA) which was chosen.

    8.) my experience w / Windows Media Player 11 (w / the operating system of Windows XP): using WMP 11, to described above of my objective (s) could not be reached e-a-s-i-l-y.  The problem with WMP - 11 - in short - which was after the desired selection "Rip settings" tab 'Options' of WMP - 11 (i.e., Format & Bit Rate) and heart-wrenching piece wanted to {'Maria Maria by Carlos Santana'} a moment later/second, WMP11 remove / would crush the previous version of the song [even].  Therefore, the program would NOT allow the user to have multiple copies of the same song on the hard drive of the PC; which obviously restricts a user to have the freedom to choose what level of quality digital audio, they prefer to listen to.

    9.) the ability to have multiple copies [at my descretion] of the same song (on my hard drive) with different bitrates and formats in my music library, is important for me because it has a direct impact on "how I enjoy MY music ', and in what form (audio quality), I choose to listen to my music.  {For example, when I exercise and listening to my camera, digital audio player (Zune), a song ('Maria Maria by Carlos Santana'), will usually be torn off at a lower rate due to the unit of capacity reduction of storage - compared to the storage capacity of notebook PCs/desktop/external hard drives PC.}  However, when I listen to my music through my home cinema or entertainment system (which contains a hard disk dedicated with a large storage capacity), I prefer to load the entertainment system with digital music files that have been ripped to WMA... with the bit being rate-setting is for the: settings "WMA Variable Bit Rate" or "WMA Lossless.

    10.) there you have it.  This is my first post in this forum.  I hope that [detailed] explanations, will be sufficient to encourage these "with knowledge & the hands on experience" using Windows Media Player 12 (as well as with WMP-10/WMP-11 respectively), by providing a [step] "How-to"... "solution to my situation.  It would be highly appreciated.  I'm looking forward-'the solution' - and relevant suggestions & and/or community feedback regarding my request for assistance.

    * Thank 'All' (that would) in advance... For your time & Assistance *.

    Certainly, you can, but I would say that they be in different folders, for your convenience as well as Windows.  You can create one for each debit/format, then you will know who is who.

    In Windows Media Player, on the toolbar, select Tools, Options, Rip, and then select the flow you want first, rip music, then change the folder (higher on the same tab) and rip again... and so on and so forth.

    When you are at home on your home theater, you can use the 320 bitrate folder, when you transfer to the Zune, you can use one of the lower bitrate files (although I personally tear it up to 320 and let the Zune reduce as he wants, even with the iPhone via iTunes, hard drive space is not really a problem here) my server has several hard drives, and I can always add more if and when space is low!

  • How to make a single instance of the application regardless of the main application and the other entry point for the application

    Hello experts,

    I explain the sceniro of my application. My request is mainly a time system as well as some other features related businesses. My app has a landing screen which is actually a custom made calendar that accumulates information captured time. There is also a time where entry screen user at will has worked time and other related information. The user has the option to run the application manually at the entrance of the time and see the reports and there the event listener to follow the events of call/SMS/e-mail that invokes the application automatically and user to the scree of time entry.

    Problem one: I used headphones to follow the events of call/SMS/e-mail. When an event is called, alternet point of entry of the application the application is running. Application then get calls time, contact information etc. and push my entry screen with pre-filled information time.

    As such, it works very well, as expected, but the problem is the number of instence that he is creating. Each track event creates a new instance of the application. I want to keep only one instance.

    Two problems: to solve this problem, I removed the other point of entry and RuntimeStore to keep the running instance of my application. This instance of the application in a way keeps in singletone as such when the listener calls the application it finds that the application is running in the background. Then she moves the application to the foreground. It works very well, I mean the application user interface called on the foreground, but he won't have to time entry screen automatically as I hope. The block of code is as follows,

    public static final long applicationID =0x8ddc44508679bd5bL;
    static NSIApplication NSIInstance=null;
    RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore();
    
    if (NSIInstance != null)
                {
                    NSIInstance.requestForeground();
                }
                else
                {
                    synchronized (runtimeStore)
                    {
                        NSIInstance = (NSIApplication)runtimeStore.get(applicationID);
                                            //listener initialization
                        NSIListener.Initialze();
                    }
    
                    if (NSIInstance != null)
                    {                   NSIInstance.requestForeground();
                                        //event's info manipulation and push the time entry screen                                     NSIInstance.RUN_NSIApplication();
                    }
                    else
                    {
                        NSIInstance=NSIApplication.getInstance();
                        NSIInstance.RUN_NSIApplication();
    
                        synchronized(runtimeStore)
                        {
                            runtimeStore.put(applicationID, NSIInstance);
                        }
    
                        NSIInstance.enterEventDispatcher();
                    }
                }
    

    I expect a guideline to follow so that I can reach the expected my workflow. Thanks in advance

    I can't propose to use the runtimestore to store instances of the application, as it was used on an example RIM, he has never worked for me.

    I suggest to use a single point of entry and the automated screen using a global event or status in the runtimestore.

  • Problem with drag and drop multiple lines of ListView

    I work on an example application with 2 views of list that is the players and the team and implement drop and drop as players can be deposited to one list to the other. Everything works as expected when there is selection unique model is enabled in the source list view. However, if I have activated several model selection and drag 2 or more lines of source target list view list view, see the following exception after that the decline is over.

    Exception:

    java.lang.IllegalArgumentException: only objects serializable or ByteBuffer can be used as data with the format of data [subListPlayers]

    at com.sun.javafx.tk.quantum.QuantumClipboard.putContent(QuantumClipboard.java:513)

    at javafx.scene.input.Clipboard.setContent(Clipboard.java:230)

    (1) what should be the DataFormat used to be able to drag and drop multiple lines? Looks like we don't have for the type of object, so I created the following which does not solve the problem.

    private DataFormat dataFormat = new DataFormat ("subListPlayers");

    (2) I made changes to support serialization on the data object that seems no more to solve the problem. Tried by implementing the interface Serializable, as well as the implementation of the Externalize interface.

    Can someone Guide please if there is an easy way to implement this behavior?

    Code:

    
    

    public class player

    {

    private String name;

    public player (String name)

    {

    myIdName = name;

    }

    public String getName()

    {

    return the name.

    }

    public void setName (String name)

    {

    myIdName = name;

    }

    @Override

    public boolean equals (Object o)

    {

    If (this == o) return true;

    If (o == null | getClass()! = o.getClass ()) return false;

    A player = o (player);

    If (name! = null? name.equals (player.name): player.name! = null) return false;

    Returns true;

    }

    @Override

    public int hashCode()

    {

    return the name of! = null? name.hashCode (): 0;

    }

    }

    SerializableAttribute public class JavaFXDnDApplication extends Application

    {

    private final static ListView < drive > playersListView = new ListView < drive > ();

    private final static ObservableList < drive > /playerslist is FXCollections.observableArrayList ();.

    private final static ListView < drive > teamListView = new ListView < drive > ();

    private final static GridPane rootPane = new GridPane();

    private DataFormat dataFormat = new DataFormat ("subListPlayers");

    Public Shared Sub main (String [] args)

    {

    Launch (args);

    }

    @Override

    public void start (point primaryStage)

    {

    primaryStage.setTitle ("Drag and Drop Application");

    initializeComponents();

    initializeListeners();

    buildGUI();

    populateData();

    primaryStage.setScene (new scene (rootPane, 400, 325));

    primaryStage.show ();

    }

    Private Sub initializeListeners()

    {

    playersListView.setOnDragDetected (new EventHandler < MouseEvent >)

    {

    @Override

    public void handle (event MouseEvent)

    {

    System.out.println ("setOnDragDetected");

    Dragboard dragBoard = (TransferMode.MOVE) playersListView.startDragAndDrop;

    ClipboardContent content = new ClipboardContent();

    content.putString (playersListView.getSelectionModel () .getSelectedItem () .getName ());

    Content.put (dataFormat, playersListView.getSelectionModel () .getSelectedItems ());

    dragBoard.setContent (content);

    }

    });

    teamListView.setOnDragOver (new EventHandler < DragEvent >)

    {

    @Override

    public void handle (DragEvent dragEvent)

    {

    dragEvent.acceptTransferModes (TransferMode.MOVE);

    }

    });

    teamListView.setOnDragDropped (new EventHandler < DragEvent >)

    {

    @Override

    public void handle (DragEvent dragEvent)

    {

    String player = dragEvent.getDragboard () .getString ();

    ObservableList < drive > drive = dragEvent.getDragboard () .getContent (dataFormat) (< drive > ObservableList);

    String player = dragEvent.getDragboard () .getString ();

    teamListView.getItems () .addAll (New Player (player));

    playersList.remove (new Player (player));

    dragEvent.setDropCompleted (true);

    }

    });

    }

    Private Sub buildGUI()

    {

    rootPane.setGridLinesVisible (true);

    rootPane.setPadding (new Insets (10));

    rootPane.setPrefHeight (30);

    rootPane.setPrefWidth (100);

    rootPane.setVgap (20);

    rootPane.setHgap (20);

    rootPane.add (playersListView, 0, 0);

    rootPane.add (teamListView, 1, 0);

    }

    Private Sub populateData()

    {

    () playersList.addAll

    New Player("Adam"), New Player("Alex"), Player ("Alfred") New Player("Albert") new,.

    New Player("Brenda"), New Player("Connie"), Player ("Derek") new new Player ("Donny").

    Player ("Lynne") new, New Player ("Myrtle"), Player ("pink") New Player("Rudolph") new,.

    Player("Tony") new, New Player ("Trudy"), Player ("Williams") New Player ("Zach") new

    );

    playersListView.setItems (playersList);

    }

    Private Sub initializeComponents()

    {

    playersListView.setPrefSize (250, 290);

    playersListView.setEditable (true);

    playersListView.getSelectionModel () .setSelectionMode (SelectionMode.MULTIPLE);

    playersListView.setCellFactory (new reminder < < drive > ListView, ListCell < drive > > ())

    {

    @Override

    public call for ListCell < drive > (ListView < drive > playerListView)

    {

    return again ListCell < drive >)

    {

    @Override

    protected void updateItem (player, boolean b)

    {

    super.updateItem (reader, b);

    If (player! = null)

    {

    setText (player.getName ());

    }

    }

    };

    }

    });

    teamListView.setPrefSize (250, 290);

    teamListView.setEditable (true);

    teamListView.getSelectionModel () .setSelectionMode (SelectionMode.MULTIPLE);

    teamListView.setCellFactory (new reminder < < drive > ListView, ListCell < drive > > ())

    {

    @Override

    public call for ListCell < drive > (ListView < drive > playerListView)

    {

    return again ListCell < drive >)

    {

    @Override

    protected void updateItem (player, boolean b)

    {

    super.updateItem (reader, b);

    If (player! = null)

    {

    setText (player.getName ());

    }

    }

    };

    }

    });

    }

    }

    
    

    Yes, it is a pain. I filed https://javafx-jira.kenai.com/browse/RT-29082 earlier. Go ahead and vote in favour if you're inclined...

    I think that the problem in your case, it is the observable list provided by MultipleSelectionModel.getSelectedItems () is not serializable. So even if you make your player Serializable class, the list is not. The first thing I would try, I think, is to make player implements Serializable and pass in an ArrayList instead of the observable list. If you can do

    content.put(dataFormat, new ArrayList(playersListView.getSelectionModel().getSelectedItems()));
    

    and

    List player = (List) dragEvent.getDragboard().getContent(dataFormat);
    teamListView.getItems().addAll(player);
    

    If it does not, a solution is simply to store the "slipped" into a property list:

    final ListProperty draggedPlayers = new SimpleListProperty();
    //...
    // Drag detected handler:
    content.putString("players");
    draggedPlayers.set(playersListView.getSelectionMode().getSelectedItems());
    
    // Drag dropped handler:
    if (dragboard.hasString() && dragboard.getString().equals("players")) {
         teamListView.getItems().addAll(draggedPlayers.get());
         draggedPlayers.set(null);
    }
    
  • Multiple entries through customization

    How can I prevent more than one element personaliztion form entry

    Hello

    There are two options:
    1. If you have this problem on PROD and then create a hook of the user on creating item entry that checks if there is already an existing entry of the item in this period then raise an exception.
    2. you can also achieve this due to the creation of a function that can return true or false in function if an item exists already or not? and call the function using customization of forms, the use of measures of the type as 'Builtin' and type of Builtin as"Execute" or "launch a function" for more details see the link http://oracle.anilpassi.com/forms-personalizations.html
    3. If you are still not in PROD, you can "ZAP" (remove all existing entries") and change the definition of the item and uncheck the authorized multiple entry

    It will be useful.

    Thank you
    Sanjay

  • Any external device to record and store the video?

    I need an external device (card reader, USB dongle, no matter) allows me to directly record and store video on this subject. My iPhone is already full, so I can't use something like an ordinary lightning flash drive, because he always would force me to record videos in my iPhone and then move it from there.

    Any ideas?

    An external device that can record and store video? Look like a video camera for me.

  • I need to read barcode using visa OR and store it in file .text

    Hi all

    I need to read to Barcdode using communications series (OR visa) and store it in .txt) file...

    (I have attached series vi read file... here I can able to read codes to bars, but quickly it goes to zero...)

    Hello

    have you checked on the examples of series communication delivered with Labview?

    In addition, if you want to send the data to the port of reliable succession, I suggest to use a cleaner approach - pack your data of barcode in a significant data structure. The data structure would look like AUT like this: 1. start of data (described at the beginning of the data packet), 2. data bar code, 1B. end of data (described at the end of the data packet) and 4. checksum of data (apply only 1 a or 1 b, whatever you prefer). If you plan to add additional information to your package of data later, this would be really easy to change. This way you can also check if the data got lost during the transfer, notify the user.

    You can take a look at how to read this data package here (set up a loop of producer-consumer, although not necessary):

    https://decibel.NI.com/content/blogs/kl3m3n/2014/10/17/serial-data-send-with-CRC-cyclic-redundancy-c...

    Best regards

    K

  • The use of pins of status (4 outputs) and data (8 entries) of the parallel port pins at the same time.

    Hi all

    I'm a newbee in labview. As part of my project work, I need to get 8 digital inputs and send 4 digital outputs.so I think to use the Parallel Port on the pc.i can make use of 8 datalines for entries. I found the site NOR is it possible to use status for output pins. But is it possible to use status for output pins pins and data for entries to the time.please help even me also mention of the measures to take, or keep in mind while implementing.also include any example vi that could be useful.

    Thanks in advance

    I would recommed you to NOT use the parallel port. Now a day you have hardly a PC with parallel port. also if you have some old PC then most likely last version of LabVIEW (e.g. 2010) will need a lot more memory RAM and processor.

    If you want a solution very very low cost then I would recommend using an arduino to that effect. You can then download LabVIEW Interface for Arduino and start working.

    If you continue to use the parallel port, then you could try (I haven't worked with parallel port and have not tested the following solutions)

    Download VIPM and then install the enclosed package. It will add the port e/s palette in your labview. and you can use it.

  • How to acquire and store the values of DAQmx analog voltage (I do not want the graphic, but strings and values in a chart)?

    Hello

    How acquire and store the values of voltage DAQmx?

    I tried several code example, but they can't get the chart. I don't want to chart. I want to measure exactly the analog voltage values and record these values - as an excel chart, that contains the selected channels and voltage values.

    What the example code that I can use?

    My hardware is NI PCI-6251.

    Thank you very much.


  • How can I read items in four tables and store them in variables?

    Greetings,

    I have 4 tables which I read to control an autonomous robot vehicle as instructions.

    I must be able to read the first elements of each table and store in separate variables 4 (direction, speed, angle, distance). Wait until the first statement has been executed. Then I move on to the second elements of each array. I'll repeat this until I went through all the elements. I am struggling to figure out how to do this?

    Please note:

    -The number of items in the tables is always the same, although the number of items varies as can be less instructions or more.

    For example, a full trial takes 1st element of table 1, table 2, table 3 and table 4 and it builds something like: forward, 10, 20, to the left. This will then be the robot moving forward at a speed of 10 over a distance of 20 and then turn left. Once this done then it contains the elements 2 and so on.

    Please find attached my VI that reads a text file and creates 4 berries.

    Thank you.

    stanm13 wrote: Unfortunately, I don't think you understood my question.

    Then, I would say a) you don't understand the answer or b) you explain well enough.

    To make each element of an array, using a loop FOR with autoindexing entered is the way to go.

  • online game servers we could take took the serverys and my mailbox was full of junk that I got blocked how do my account unlocked and keep unwanted entry in?

    online game servers we could take took the serverys and my mailbox was full of junk that I got blocked how do my account unlocked and keep unwanted entry in?

    You need to ask your email provider. If you have Hotmail:

Maybe you are looking for

  • Portege R100 does not start

    Can someone help me please. My Portege R100 does not start, when I turn the following text appears: in touch with tomorrow toshiba. After a few seconds a black screen with a blinking cursor on the left side of the screen. Thank you very much

  • Assistance of Nexus 5 k with VPC and routing

    Hello guys,. We are trying to implement a new solution for one of our customers who have purchased a pair of devices 5596UP nexus. We have this topology attached in jpeg format. They want to use the pair of 5 k for LAN and WAN connectivity. Backgroun

  • Java to the CTC 8.6 problem

    We have an optical network with ONS 15454 devices running the CTC 8.6 I tried to run CTC machines above Windows XP without success (I tried Windows 7 and Server 2012). I tried JRE version 1.4 to 6. I get "error launching CLC" every hour (or different

  • Doubt animation image

    Hello I need to use the animation on some images in my screen. It's like, I have about 4 images on one another on my home screen.  I need to show a fade in/out animation on the images. I went through the tutorial animation. My code goes here ImageVie

  • Spooler printer error 1068: dependency or group Service was able to start

    Original title: Error 1068 I had this problem with error 1068"the dependency service or group could start. Background - I tried to add a printer that is installed on another PC on the network. When I clicked on add a printer, I get the message. "Wind