Need to output 8 channels using double buffer

Hi,
I need to ouput 8 channels to the DAQ card.
I am getting an array 8 bytes of data every 10 milliseconds.
Each byte corresponds to a channel.
I am using your WFMDoubleBuffer.c code.
The changes I have made are :
1. Changed the buffer from 32K to 16 bytes. I am assuming 8 bytes with double buffer = 16 bytes
2. I'm not sure about updateRate, so I set it to 1.0
Result : I get an error from WFM_Group_Control(). It says "The operation could not complete within the time limit", error = -10800
I have attached the file for your reference.
Please help me.
Thanking you in anticipation
Chandra
Attachments:
WFMdoubleBuf.C ‏8 KB

Chandra,
The timeout error here is slightly misleading. The reason this is happening is caused by a few things. By default, the card to setup to transfer data when the onboard FIFO is full, and so your half buffer must be the same size or large than your FIFO unless you have regeneration turned on. Regeneration will cause your buffer to be copied as many times as possible into the FIFO until it is full. Your 6713 has an AO FIFO size of 16,384. So your buffer size must be twice this, so that your half buffer is >= 16384. Where is your data coming from at these 10 ms intervals, from a program or another device? This could affect what method would be the best solution.
If you want to keep working on this, let�s stick to one channel, I sent you an email, did you get
it?
Kevin R
Applications Engineer
National Instruments

Similar Messages

  • Conky won't use double buffer anymore?

    i posted the other day having issues setting up dual monitors, not that i got any help, but figured i'd mention. anyway, since i've had the dual monitors setup, conky won't run using double buffering for some reason. its in my conky config, and DBE is being loaded in my xorg.conf. so its bugging me now. wondering is anyone has a clue here. my system is fully up to date as of right now, and running an nvidia card, so nvidia driver on a 7900GS video card, might be an 8800, i forget which card is in which box at the moment
    here's my conky config
    alignment top_right
    background yes
    border_width 1
    cpu_avg_samples 2
    default_color white
    default_outline_color black
    default_shade_color black
    draw_borders no
    draw_graph_borders yes
    #draw_outline yes
    draw_shades yes
    use_xft yes
    xftfont DejaVu Sans Mono:size=10
    gap_x 5
    gap_y 5
    minimum_size 5 5
    net_avg_samples 2
    #no_buffers yes
    double_buffer yes
    out_to_console no
    out_to_stderr no
    own_window yes
    own_window_transparent yes
    own_window_class Conky
    own_window_type desktop
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_page
    stippled_borders 0
    update_interval 1.0
    uppercase no
    use_spacer none
    show_graph_scale no
    show_graph_range no
    TEXT
    $nodename - $sysname $kernel on $machine
    Uptime:$color $uptime
    $hr
    CPU > ${freq}MHz ${hr 1}$color
    CPU Usage:$color $cpu% ${cpubar 4}
    ${cpugraph 15,280 ffffff 00A2FF}
    MEMORY $memmax ${hr 1}
    RAM : $mem / $memperc%${alignr}${membar 6,120}
    I/O : ${diskio}${alignr}${diskiograph 6,120}
    DISK > /dev/ ${hr 1}$color
    Root ( sda3 ): ${fs_free /} ${fs_bar 6 /}
    Home ( sda4 ): ${fs_free /home} ${fs_bar 6 /home}
    Movies ( sdb1 ): ${fs_free /home/movies} ${fs_bar 6 /home/movies}
    Windows ( sdc1 ): ${fs_free /mnt/sdc1} ${fs_bar 6 /mnt/sdc1}
    NETWORK > ${addr eth0} ${hr 1}$color
    ${downspeedgraph eth0 15,135 ffffff 00A2FF} ${upspeedgraph eth0 15,135 ffffff 00A2FF}
    Down / Up Speed: ${downspeed eth0} k/s / ${upspeed eth0} k/s
    Down / Up Bytes: ${totaldown eth0} / ${totalup eth0}
    Inbound / Outbound / Total: ${tcp_portmon 1 32767 count} / ${tcp_portmon 32768 61000 count} / ${tcp_portmon 1 65535 count}
    PROCESSES > ${processes} / ${running_processes} ${hr 1}$color
    NAME PID CPU% MEM%
    ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
    ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
    ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
    ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
    ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
    ${exec feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`"}
    here's my xorg.conf as well if it helps. if there is anything someone can suggest adding or removing from it, especially to tweak video performance, i'm wide open for suggestions while im here
    Section "ServerLayout"
    Identifier "Xorg Configured"
    Screen 0 "Screen0" LeftOf "Screen1"
    Screen 1 "Screen1" 1600 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "PS/2 Mouse" "CorePointer"
    EndSection
    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc:unscaled"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/100dpi"
    FontPath "/usr/share/fonts/PEX"
    FontPath "/usr/share/fonts/cyrillic"
    FontPath "/usr/share/fonts/Type1"
    FontPath "/usr/share/fonts/ttf/western"
    FontPath "/usr/share/fonts/ttf/decoratives"
    FontPath "/usr/share/fonts/truetype"
    FontPath "/usr/share/fonts/truetype/openoffice"
    FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
    FontPath "/usr/share/fonts/latex-ttf-fonts"
    FontPath "/usr/share/fonts/defoma/CID"
    FontPath "/usr/share/fonts/defoma/TrueType"
    EndSection
    Section "Module"
    Load "ddc" # ddc probing of monitor
    Load "dbe"
    Load "extmod"
    Load "glx"
    Load "bitmap" # bitmap-fonts
    EndSection
    Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    Option "Xinerama" "1"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "keyboard"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbVariant" ""
    EndSection
    Section "InputDevice"
    Identifier "Serial Mouse"
    Driver "mouse"
    Option "Protocol" "Microsoft"
    Option "Device" "/dev/ttyS0"
    Option "Emulate3Buttons" "true"
    Option "Emulate3Timeout" "70"
    Option "SendCoreEvents" "true"
    EndSection
    Section "InputDevice"
    Identifier "PS/2 Mouse"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "ZAxisMapping" "4 5"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons" "true"
    Option "Emulate3Timeout" "70"
    Option "SendCoreEvents" "true"
    EndSection
    Section "InputDevice"
    Identifier "USB Mouse"
    Driver "mouse"
    Option "Device" "/dev/input/mice"
    Option "SendCoreEvents" "true"
    Option "Protocol" "IMPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Buttons" "5"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "CRT-0"
    HorizSync 30.0 - 121.0
    VertRefresh 48.0 - 160.0
    ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
    Option "DPMS" "true"
    EndSection
    Section "Monitor"
    Identifier "Monitor1"
    VendorName "Unknown"
    ModelName "SUN GDM-5410"
    HorizSync 30.0 - 121.0
    VertRefresh 48.0 - 160.0
    EndSection
    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce 7900 GS"
    BusID "PCI:2:0:0"
    Screen 0
    EndSection
    Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce 7900 GS"
    BusID "PCI:2:0:0"
    Screen 1
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "TwinView" "0"
    Option "TwinViewXineramaInfoOrder" "CRT-0"
    Option "metamodes" "CRT-0: 1600x1200_75 +0+0"
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection
    Section "Screen"
    Identifier "Screen1"
    Device "Device1"
    Monitor "Monitor1"
    DefaultDepth 24
    Option "TwinViewXineramaInfoOrder" "CRT-0"
    Option "TwinView" "0"
    Option "metamodes" "CRT-1: 1600x1200 +0+0"
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection

    Hi @Arboria9 ,
    I see that you are experiencing issues printing two-sided from Yosemite. I would like to help you resolve this issue.
    You have pretty much have done all the steps that I would have provided.
    Are you still able to print two-sided from the Windows computer?
    Are you missing the option to select two-sided printing in the print driver?
    Check the driver name that is installed for the printer. Make sure it shows just the printer's name.
    Click the Apple menu and then click System Preferences. Click Printers & Scanners, highlight the printer name on the left side and on the right side of the screen it should show the printer's name. (Officejet 6500)
    If the full printer name isn't listed correctly, delete it and add the printer name back in from the list. Click the - sign to delete the driver and then click the + sign to add the driver, might have to click the drop down to select the printer's name to add it in.
    How was the printer name listed?
    If you need further assistance, just let me know.
    Have a great day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Help needed to debug Communication Channel using Seeburger modules

    Hi ALL
    Can you please, help debug the following communication channel using File adapter & seeBurger module.
    Adapter Framework caught exception: I/O operation failed : java.lang.ClassNotFoundException: com.sap.engine.messaging.impl.spi.transport.PasswordCredentialImpl -
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.app] Living status: alive Direct parent loaders:   [system:Frame]   [service:servlet_jsp]   [service:ejb]   [library:com.sap.xi.util.misc]   [service:com.sap.aii.adapter.xi.svc] Resources:   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/EJBContainer/applicationjars/com.sap.aii.af.ejb.jar   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/classes   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/lib/com.sap.aii.af_api.jar -
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.lang.ClassNotFoundException: com.sap.engine.messaging.impl.spi.transport.PasswordCredentialImpl -
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.app] Living status: alive Direct parent loaders:   [system:Frame]   [service:servlet_jsp]   [service:ejb]   [library:com.sap.xi.util.misc]   [service:com.sap.aii.adapter.xi.svc] Resources:   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/EJBContainer/applicationjars/com.sap.aii.af.ejb.jar   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/classes   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/lib/com.sap.aii.af_api.jar
    Your help is greatly appreciated!
    Thank you,
    Patrick

    Hi Patrick,
    It seems that your seeburger instalation was not successfull.
    Try installing it again and make all the libraries are there.
    Regards,
    Luismier
    Edited by: Luismier on Aug 26, 2009 10:57 PM
    Edited by: Luismier on Aug 26, 2009 11:16 PM

  • Is anyone successfully outputting 8 channels using ETT/Insert ?

    I've been trying to do an 8 channel output, but can't get it to work.
    If I choose 8 channel audio mapping in the Device Control preset, with RS222 control, then in my ETT window the destination track control popup for the audio tracks shows channel 4 as already enabled but its greyed out and can't be modified.
    Then, regardless of ouput channel selection, FCP's device control seems unable to control channels 5 to 8 on the recorder.
    In FCP, if I select any output channels above channel 4, then all channel selections below 4 are ignored, and the recorder receives a signal to enable channels 1 to 4 relative to my selections in FCP for channels 5-8.
    Any tips greatly appreciated.
    Cheers
    Andy

    we're using a Decklink Extreme card and sending to a Sony IMX vtr (msw-2100)
    ... but i'm not sure this has anything to do with the deck or the card as the problem seems to originate within FCP. as i mentioned, you just have to select 8 channel audio mapping to see the problem - as soon as you do that your destination audio controls in the ETT window get srewed up (can't un-map channel 4) and if we manually override the channel selection on the deck we can see and monitor the output channels and they are all ok.
    heaven forbid, but it seems to be a bug.

  • Using UserControl to show bitmap flicker, I have used double buffer

    Hi!
    I have created a coustom control derived from a UserControl using C#, and I created a bitmap to draw every component, and then draw this bitmap to the screen. But, when I pan this picture, it refresh from top to bottom in the control, and cause a flicker,
    you can see many horizontal lines flicker in it.
    So, what can I do to fix this problem?
    Thank you very much!

    some dode like this:
            protected override void OnPaint(PaintEventArgs e)
                CreateImage();
                if (imgImageForDraw != null)
                    e.Graphics.DrawImage(imgImageForDraw, 0, 0, this.Width, this.Height);
               imgImageForDraw.Dispose();
            private void CreateImage()
                Graphics g;
                Pen p;
                //-------------------------------------------no image---------------------------------------
                #region no image
                if (imgImageToShow == null)//no image
                    imgImageForDraw = new Bitmap(this.Width, this.Height);
                    g = Graphics.FromImage(imgImageForDraw);
                    g.Clear(Color.Black);
                    p.Dispose();
                #endregion
                //-------------------------------------------have image---------------------------------------
                #region have image
                else//have image
                    imgImageForDraw = new Bitmap(this.Width, this.Height);
                    g = Graphics.FromImage(imgImageForDraw);
                    if (bEnvironmentSetted)//simulate
                        log.info("Environment set", "SA" + nSAID.ToString() + ".SC" + nSCID.ToString() + ".CreateImage");
                        //-------------------------Pan Image------------------------------------------------
                        #region Pan Image
                        if (eMouseOperationStatus == MouseOperationStatus.PanImage)
                        {//simulate pan image
                            try
                                log.info("Pan Image", "SA" + nSAID.ToString() + ".SC" +
    nSCID.ToString() + ".CreateImage");
                                Rectangle ShowPosition = new Rectangle(narrGeneralVariable[0],
    narrGeneralVariable[1],
    narrGeneralVariable[2],
    narrGeneralVariable[3]);
                                Rectangle ShowPart = new Rectangle(narrGeneralVariable[4],
    narrGeneralVariable[5],
    narrGeneralVariable[6],
    narrGeneralVariable[7]);
                                g.Clear(Color.Black);
                                g.DrawImage(imgImageToShow, ShowPosition, ShowPart, GraphicsUnit.Pixel);
                            catch (System.Exception PanEX)
                                ExceptionLog.info(PanEX.Message, "An exception break in Pan of Paint");
                        }//simulate pan image
                        #endregion
                    }//simulate
                }//have image
                #endregion
                if (g != null) g.Dispose();
                log.info("End", "SA" + nSAID.ToString() + ".SC" + nSCID.ToString() + ".CreateImage");

  • Using 6533 DIO32HS, is it possible to use double buffered output with varying pauses?

    I'm using Level-Ack handshaking to transmit data. Currently, I'm hooked up to a loop-back on the DIO32HS card.
    If I don't use double-buffering, I end up with pauses in data transmission, so I need to use double buffering. Unfortunately, I can't seem to set up a delay in the middle of a double buffered scheme.
    What I need to do is this:
    Transmit 64 packets of data (16 bits each) on group 2 / Receive 64 packets of data (16 bits each) on group 1
    Delay for .2 ms
    Transmit the same packets again / receive
    The delay in the middle will need to be varied, from .2 to 20 ms.
    I'm programming in Visual C++ 6.0 under Windows 2000, with (as suggested above) group1 c
    onfigured as input (DIOA and DIOB) and group2 set up as output (DIOC and DIOD). Due to the speed of transmission (256kHz) and the small size of the data set, the program I wrote, no matter how tight I try to make it, cannot insert the proper delay and start the next send on time.
    Does anyone have any idea if such a pause is possible? Anyone know how to do it, or any suggestions on what to try?
    Thanks!

    .2 ms is a very small time delay to use in software. Windows usually isn't more accurate than about 10 or 20 ms. If you need to have small, precise delays you could either use a real time OS, like pharlap and LabVIEW RT, or use extra hardware to generate the delays correctly.
    I would recommend using a separate MIO or counter/timer board (like a 660x) to generate timing pulses for the DIO32HS. This gives you precise timing control at high speed. If the 32HS is in Level ACK Mode, it will respond to external ACK and REQ signals. This is covered in more detail on page 5-10 of the PCI-DIO32HS User Manual.

  • How Do I Output 4-Channel Discreet Audio?

    Is there a way to output 4-channel discreet audio in FCP? We want channels 1&2 to be stereo and channels 3&4 to be mono.
    Anybody???
    thanks

    well the first place to start, if you haven't done so already, is to set your project up with the output settings you are wanting to get.
    with your sequence active, go to Sequence menu > Settings... then select the Audio Outputs tab in the settings window
    you'll need to select 4 audio outputs with the channel grouping of the first pair set as stereo and the second pair as dual mono
    you assign individual tracks in your sequence to the audio outputs by right clicking in the track on or around the track lock icon / autoselect icon, and selecting Audio Outputs from the context menu and then target track from its submenu
    you may need to simply double up your tracks if you are trying to create both a stereo and mono copy of the same audio within the same timeline as FCP does use have a powerful enough patch bay paradigm for this purpose

  • Double Buffer

    Hi all,
    I've just written this Digital Clock in Java and I'm trying to add a double buffer to it to stop it flickering however I get 4 errors when I try to compile it. Here is the code:
    (START OF CODE)
         import java.awt.*; //puts in abstract windows toolkit to get output on screen
         import java.util.*;
         import java.applet.Applet;
         import java.awt.event.*;
         //<applet code="DigitalClock.class" width=400 height=400></applet> //displays applet without needing to create HTML file
         public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
         Image myimage,buffer;
         Graphics doublebuffer;
         private javax.swing.Timer timer; //implements timer
         public void init() {
    timer = new javax.swing.Timer(1000, this);
    timer.setInitialDelay(0);
    timer.start();
         buffer = createImage(width,height);
         doublebuffer = buffer.getGraphics();
         public void paint(Graphics g) //states that the code below will paint objects onto the applet
         g.setColor (Color.white); //sets colour to white
         g.drawRect(130, 78, 120, 30); //rectangle shape surrounding digital clock
         g.setColor (Color.darkGray); //sets colour to grey
         g.fillRect(132, 80, 117, 27); //fills rectangle from code 2 lines up with colour grey
         setBackground(Color.black); //specifies background colour as black
         Calendar myCal = new GregorianCalendar();
         myCal.set(1956, Calendar.MARCH, 17); //
         of myCal.setTime(myCal2.getTime());
         myCal.setTime(new Date());
         int year = myCal.get(Calendar.YEAR); int mnth = myCal.get(Calendar.MONTH) + 1;
         int DATE = myCal.get(Calendar.DATE); System.out.println(DATE + "." + mnth + "." + year);
         myCal.add(Calendar.YEAR, 1);
         DATE myDate = myCal.getTime(); System.out.println(myDate);
         GregorianCalendar cal = new GregorianCalendar(); //tells program to implement the a new Gregorian Calemder in order to display a date or time
         doublebuffer.setFont(new Font("Arial", Font.BOLD,20)); //sets font to arial, bold style, and size 20
         doublebuffer.setColor (Color.white); //sets colour to white
    doublebuffer.drawString(cal.get(Calendar.HOUR_OF_DAY) + " : " + //examines windows clock to get current hour
    cal.get(Calendar.MINUTE) + " : " + //examines windows clock to get current minute
    cal.get(Calendar.SECOND), 140, 100); //examines windows clock to get current second
         doublebuffer.setFont(new Font("Arial", Font.BOLD,15)); //sets the font to arial, bold style, and size 15
         doublebuffer.drawString("By Darren Cole", 130, 270); //adds words in pink as string and specifies coardinates
         doublebuffer.drawString("Last Modified: 03/04/03", 110, 290); //adds words in pink as string and specifies coardinates
         doublebuffer.drawLine(90, 60, 130, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(210, 60, 250, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 60, 210, 60); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 90, 130, 107); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 60, 90, 90); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.setColor (Color.darkGray); //sets colour to dark grey
         doublebuffer.fillRect(129, 62, 83, 16);
         g.drawImage(buffer,0,0,this);
         public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
         repaint(); //keeps repainting the digital clock graphics as the time changes i.e. keeps looping the code over
    (END OF CODE)
    What am I doing wrong here? Also I've tried to implement the date as well using a GregorianCalendar. How would I actually make the date appear on the page?
    Thanks,
    Darren

    Most of that doesn't matter now because I've now put in a simplercode for the date but it still doesn't display. But now I get 10 errors. The new code is:
    (START OF CODE)
    import java.awt.*; //puts in abstract windows toolkit to get output on screen
         import java.util.*;
         import java.applet.Applet;
         import java.awt.event.*;
         //<applet code="DigitalClock.class" width=400 height=400></applet> //displays applet without needing to create HTML file
         public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
         Graphics doublebuffer;
         private javax.swing.Timer timer; //implements timer
         public void init() {
    timer = new javax.swing.Timer(1000, this);
    timer.setInitialDelay(0);
    timer.start();
         doublebuffer = buffer.getGraphics();
         public void paint(Graphics g) //states that the code below will paint objects onto the applet
         doublebuffer.setColor (Color.white); //sets colour to white
         doublebuffer.drawRect(130, 78, 120, 30); //rectangle shape surrounding digital clock
         doublebuffer.setColor (Color.darkGray); //sets colour to grey
         doublebuffer.fillRect(132, 80, 117, 27); //fills rectangle from code 2 lines up with colour grey
         setBackground(Color.black); //specifies background colour as black
         Calendar date = new GregorianCalendar();
         DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
         String date = df.format(new Date());
         GregorianCalendar cal = new GregorianCalendar(); //tells program to implement the a new Gregorian Calemder in order to display a date or time
         doublebuffer.setFont(new Font("Arial", Font.BOLD,20)); //sets font to arial, bold style, and size 20
         doublebuffer.setColor (Color.white); //sets colour to white
    doublebuffer.drawString(cal.get(Calendar.HOUR_OF_DAY) + " : " + //examines windows clock to get current hour
    cal.get(Calendar.MINUTE) + " : " + //examines windows clock to get current minute
    cal.get(Calendar.SECOND), 140, 100); //examines windows clock to get current second
         doublebuffer.setFont(new Font("Arial", Font.BOLD,15)); //sets the font to arial, bold style, and size 15
         doublebuffer.drawString("By Darren Cole", 130, 270); //adds words in pink as string and specifies coardinates
         doublebuffer.drawString("Last Modified: 03/04/03", 110, 290); //adds words in pink as string and specifies coardinates
         doublebuffer.drawLine(90, 60, 130, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(210, 60, 250, 77); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 60, 210, 60); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 90, 130, 107); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.drawLine(90, 60, 90, 90); //specifies coardinates for lines that give 3D effect to Digital Clock
         doublebuffer.setColor (Color.darkGray); //sets colour to dark grey
         doublebuffer.fillRect(129, 62, 83, 16);
         g.drawImage(buffer,0,0,this);
         public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
         repaint(); //keeps repainting the digital clock graphics as the time changes i.e. keeps looping the code over
    (END OF CODE)
    The errors are:
    ---------- Javac ----------
    DigitalClock.java:63: 'class' or 'interface' expected
         public void actionPerformed(ActionEvent e) //tells program that there is an action event specified in the code below
    ^
    DigitalClock.java:70: 'class' or 'interface' expected
    ^
    DigitalClock.java:70: 'class' or 'interface' expected
    ^
    DigitalClock.java:8: DigitalClock should be declared abstract; it does not define run() in DigitalClock
         public class DigitalClock extends Applet implements ActionListener, Runnable //listen for action events
    ^
    DigitalClock.java:21: cannot resolve symbol
    symbol : variable buffer
    location: class DigitalClock
         doublebuffer = buffer.getGraphics();
    ^
    DigitalClock.java:37: cannot resolve symbol
    symbol : class DateFormat
    location: class DigitalClock
         DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
    ^
    DigitalClock.java:37: cannot resolve symbol
    symbol : variable DateFormat
    location: class DigitalClock
         DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
    ^
    DigitalClock.java:37: cannot resolve symbol
    symbol : variable DateFormat
    location: class DigitalClock
         DateFormat df=DateFormat.getDateInstance(DateFormat.LONG);
    ^
    DigitalClock.java:38: date is already defined in paint(java.awt.Graphics)
         String date = df.format(new Date());
    ^
    DigitalClock.java:58: cannot resolve symbol
    symbol : variable buffer
    location: class DigitalClock
         g.drawImage(buffer,0,0,this);
    ^
    10 errors
    Normal Termination
    Output completed (2 sec consumed).
    Thanks,
    Darren

  • What is the best way to double buffer in this case and how to do it....

    currently I have
    public class Frame1 extends JFrame{
    //inside this class I call up circle class, rectangle class, etc.... to draw
    }I am making a "paint" program, and I have individual classes to handle the paint methods heres an example:
    abstract public class Shape {
        public Shape() {
        public abstract void draw(Graphics g, Color c, int x, int y, int width,int height);
    }and then....
    public class Circle extends Shape{
        public Circle() {
        public void draw(Graphics g, Color c, int oldx, int oldy, int newx, int newy) {
            g.setColor(c);
            g.drawOval(Math.min(oldx, newx), Math.min(oldy, newy), Math.abs(oldx - newx), Math.abs(oldy - newy));
    }There is also a Rectangle class, line class.... etc! So my question to you is the following... what is the best way to implement double buffer in the individual classes? And how to do it?? And also.... the drawings should be kept inside a jPanel.
    Any bit of help is much appreciated Thank you!!

    You don't need to do double-buffering. Swing
    components are double-buffered by default. Just make
    sure you override paintComponent() and not paint().
    And even if you had to, why would there be any
    difference in implementation for your classes whether
    they paint to on- or off-screen graphics?I need to override paintComponent()? what if I don't...
    I am using JBuilder2005 and they automate somethings for me. So thats how they did it when they created the application they did this....
    public class Frame1 extends JFrame{
    /*** all my code here***/
    public class Application1 {
        boolean packFrame = false;
         * Construct and show the application.
        public Application1() {
            Frame1 frame = new Frame1();
            // Validate frames that have preset sizes
            // Pack frames that have useful preferred size info, e.g. from their layout
            if (packFrame) {
                frame.pack();
            } else {
                frame.validate();
            // Center the window
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            Dimension frameSize = frame.getSize();
            if (frameSize.height > screenSize.height) {
                frameSize.height = screenSize.height;
            if (frameSize.width > screenSize.width) {
                frameSize.width = screenSize.width;
            frame.setLocation((screenSize.width - frameSize.width) / 2,
                              (screenSize.height - frameSize.height) / 2);
            frame.setVisible(true);
            try {
                jbInit();
            } catch (Exception ex) {
                ex.printStackTrace();
         * Application entry point.
         * @param args String[]
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    try {
                        UIManager.setLookAndFeel(UIManager.
                                                 getSystemLookAndFeelClassName());
                    } catch (Exception exception) {
                        exception.printStackTrace();
                    new Application1();
        private void jbInit() throws Exception {
    }

  • I need to output a PAL HDV project from FCP as a PAL DV file with 4 audio t

    I need to output a PAL HDV project from FCP as a PAL DV file with 4 audio tracks - specifically one stereo pair to be t1&t3, the other stereo pair to be t2&t4. This is the standard way requested by an international distributor of tv programmes. I understand how to set the sequence in FCP to output 4 audio tracks - either 2 stereo pairs (1&2, + 3&4), or 4 discrete tracks. But how do I then output this as a QT file?
    The manual tells me that to export multiple audio tracks, File>Export>QT Movie has it's Config pop-up menu in the Audio Settings area of the General tab of the Sequence Settings. Well, that's set for 4 discrete channels, but the QT export settings only allow for 2 mono or 1 stereo output, and that's what I get when I try it. What it says in the manual just doesn't happen.
    Exporting via Compressor, on the other hand, has an abundance of choices of 4-track outputs, none of which are labelled as anything resembling 'discrete'. Would any of those 4.0 settings suffice? Or am I likely to get myself into difficulties further down the line? As I am monitoring for this task on a 2-track audio system, I cannot confirm exactly what I am getting when I use any of those settings.
    Any advice would be greatly appreciated!
    John

    Call me naive, but I've not heard of splitting the stereo pairs like this before.
    What broadcaster? (perhaps one of our EU regulars will drop in...)
    You can do all sorts of pairing but it is coincident tracks pairing- eg 1/2 + 3/4
    Sorry I can't offer anything.
    x

  • How to program labview to output continous voltage using NI PCI-MIO-16XE-50

    I am an undergraduate student working on a research project. I need to program a labview block diagram to output continous voltage using DAQ NI PCI-MIO-16XE-50. I am new to this and having problems with formulating.
    For example, if i need to output 4V, how to output 4V from the DAQ.
    I know that there are 2 channels for output. But having problems figuring out which pins to use as well.
    If there are any examples,tutorials or whatever hints i could get in order to solve this, that would be great. I am simply confused and wondering where to start.
    Thanks in advance.
    Confused undergraduate student

    Here is an example of how to do some basic analog and digital communication. Since you need a 4V signal you are going to want to use Analog Output.
    http://decibel.ni.com/content/docs/DOC-15408
    Product Support Engineer
    National Instruments

  • Why when i input a double complex in the decimate the output is a real double?

    Hi everybody, the question is pretty much what i wrote in the title.
    I have a double complex signal and when i put in the decimate function the output is a real double, why is that?
    Thanks to everybody and sorry for the bad english

    The tools from the signal processing palette only operate on DBL. Notice the coercion dot at the terminal where you wire the complex array. Use the decimate from the array palette instead (resize as needed).
    If you want the full functionality of the other decimate.vi for complex arrays, make your own. Does not seem too hard, probably a single small loop.
    Message Edited by altenbach on 06-05-2007 01:11 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    decimate.png ‏4 KB

  • Settings to output to BluRay using Compressor

    I have a sequence I need to output to Blu-Ray, and yes, I have a Blu-Ray burner. I know I need to use Compressor to do the Blu-Ray encoding, but what settings do I use to export out of FCP?

    Well, I've run into a bit of a problem. I exported the video, and then exported the 6-channel audio. I then used Compressor to create the .ac3 for the audio, but the Blu-Ray template wants to use the "audio" from the vide file -- of which there is none. If I export the Quicktime movie, with the timeline set to 5.1, will the whole thing be exported as one file...? And will it be properly assigned as far as speaker placement, i.e., L,R,C,LFE,Ls,Rs?
    Thanks again

  • Outputting 2 channels from an AT-MIO board

    i'm attempting to output 2 channels from an AT-MIO-16E-1 board using
    labview. the first channel goes out fine but when i try to add the second
    i get an error message and no second channel. the error mesage is:
    Error -10687 occured at AO Buffer Write.
    Possible reasons: A configuration change has invalidated the acquistion
    buffer, or an acquisition buffer has not been configured.
    does anyone know how to solve this problem?
    thanks,
    jon.

    Thank you for contacting National Instruments.
    When you write �instrument driver,� I understand you to mean one of the complete LabVIEW VIs often available for communicating with things like o-scopes and DMMs through serial or GPIB interfaces. These usually have front panels similar to the look of the actual instrument.
    When it comes to DAQ products, there are no �instrument drivers� per se. Nonetheless, there are a variety of example programs available. From the first screen that you see when you load LabVIEW, choose the option to search examples. Then look under Data Acquisition. There will be examples available for whatever type of DAQ operation you wish to perform.
    Regards,
    Mike G.
    National Instruments Support

  • Double buffer for different components.

    Currently I'm working on a project where I have a JPanel inside of a JFrame. The panel takes up a portion of the frame and on other side I have a JButton and two JTextfields. My double buffer method works fine for the JPanel but every time it's repainted the other components in my JFrame look like they need to be buffered. What would be the best way to fix this? I think I just need to re-add the other components whenever the Panel is repainted but I run into a lot of problems if that's the case.

    We can't see your code so we'll take your word for it. But if I use Swing components they typically don't 'need buffering' by which I assume you mean that they flicker? So the problem is when you combine your code with Swing so you'll have to debug that yourself or show some code (preferrably as SSCCE).

Maybe you are looking for

  • Memory arrangements in iMac i5 quad core (mid 2010)

    I used to run 8 GB of ram in 4 modules. The upper two slots were occupied with the 2 samsung 2GB modules that came with the computer. The lower two slots I filled with 2 more 2 GB ram modules from corsair. These 8 Gb of RAM worked fine until one of t

  • Invalid initial heap size error when starting weblogic server 11g R1

    I installed JDeveloper Studio 11.1.1.2.0 . When iItried to start weblogic server 11g R1, I had this message : starting weblogic with Java version: java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM

  • Printing issue in Adobe Reader

    Customer supplied blueprint in greyscale. When I print it out, it is too light to read the dimensions. When I adjust the printer to the darkest setting, the dimensions become choppy. Would like to convert the greyscale so I can print a regular black

  • High disk utilization every 24 hours

    Hi all, While troubleshooting an user's complain about slow access to his mailbox on a Windows 2012/Exchange 2013 environment, I came across this interesting behavior: Disk utilization on the server will increase from 100KBps to 3000KBps (on average)

  • I can not download CS5 Master for PC using Vista Home Premium

    I have Intel Core 2 Quad, 64 bit operating system, 6 GB RAM, 425 GB Free disc space (586 GB Total). I still get a system requirement error message. Most of the time it seems like the disc is not being read. It tells me to insert Disc 2 but Disc 1 nev