Comunicación serie

Saludos a todos los miembros, estoy realizando una comunicación por puerto serie entre dos computadoras, deseo hacer un chat entre las dos, lo programe para que al preesionar la tecla enter(por estructura de eventos) se envie el mensaje, pero el problema es que el receptor solo recepta si presiona alguna tecla.
Asumo que el lapso queda encerrado en el la estrcutura de evento y por eso espera a presionar una tecla y luego pueda leer el mensaje.
Alguien que me ayude a solucionar el problema.? adjunto el programa y fotos del mismo

Estás intentando leer 1024 bytes, que pueden ser demasiado para el comando IDN. El error dice que no han llegado los caracteres en el tiempo previsto.
¿Cuántos bytes esperas de tu dispositivo? Si no lo sabes, intenta poner un valor bajo en el campo bytes to read y mira lo que pasa.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • Conversión usb-rs232

    He adquirido recientemente un conversor usb-rs232 para mi ordenador portatil (Prolific usb-to-comm). He instalado el programa Niser310 que he descargado de la página de National Instruments. De esta forma, he conseguido mandar datos por mi nuevo puerto serie. Estoy controlandormediante este puerto el Generador de funciones HP-33120A
    El problema que tengo es que al enviar grandes cantidades de datos se produce el desbordamiento del buffer de recepción del generador, aunque tenga activo el protocolo de comunicacón hardware DTR/DSR (que es el que admite el intrumento). Este fallo es curioso porque cuando ejecuto el mismo código en mi ordenador de sobremesa este error no se produce, pudiendo enviar gran cantidad de datos sin problema.
    Caracteristicas de la comunicación serie; velocidad 9600 baudios, 1 bit de inicio, 2 bits de parada, 8 bits de datos (no paridad), COM1, tamaño del buffer 1Kbyte.
    Sistema Operativo Windows XP, LabVIEW 7.0.
    Alguien me puede ayudar... Muxas Gracias.-
    Mensaje editado por fran_m
    Adjuntos:
    Simulación de perturbaciones en la red.vi ‏412 KB
    Subinstrumentos.zip ‏81 KB

    Hola Fran el problema es posible que sea por los limites de tu adaptador serial, o la version de drivers que estas utilizando. Prueba Descargar una version mas actualizada de los drivers de tu adaptador, esto puede corregir el problema.
    Saludos
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD

  • Comunicar s7-300 con labview

    Hola, tengo un S7-300 conectado mediante RS-232 a un convertidor RS-232/USB de siemens y éste a un puerto USB mi PC. He configurado el servidor OPC de NI y cuando trato de comprobar la conexión con el quit-client me da un error (ver imagen) ¿Que puedo estar haciendo mal? Podría ser la configuración de la comunicación serie, baudios, paridad,... No lo se he probado con varias pero sin exito. Alguien me puede ayudar. Gracias.
    Adjuntos:
    12-12-2013 19-09-39.jpg ‏99 KB

    Hola pcortes;
    Gracias por el tiempo dedicado. He seguido los pasos que me has indicado. Para descartar el Firewall lo he desactivado, luego he reinstalado el NI OPCserver y ya no me da el error que te comenté. Sin embargo, al probar con el cliente OPC no consigo que se muestren los valores de las variables digitales configuradas (una entrada y una salida). ¿Que estoy haciendo mal? Te adjunto dos capturas de pantalla por si te sirven. Gracias una vez mas.
    Adjuntos:
    client OPC.jpg ‏172 KB
    serverOPC.jpg ‏183 KB

  • NI 1742 Smart Camera: Error de comunicaci​on con remote target en NI MAX

    Buenos días con todos,
    tengo varios problemas con mi Smart Camera NI 1742:
    Problema 1.- Mi camara es de puerto ethernet dual , pero ahora me sale que tiene un solo puerto Ethernet. No se como se puede arreglar este problema pues desde que apareció este error me genera el "Problema 2"
    Problema 2.- Cuando quiero acceder al software de la smart camara me envia este siguiente mensaje de error.
    Necesito ayuda urgente pues esta cámara será utilizada en un proyecto especial.
    ¡Resuelto!
    Ir a solución.

    Hola;
    El error que estás viendo se debe a que la cámara no puede establecer comunicación con la PC.-
    En efecto la cámara 1742 cuenta con dos puertos ethernet para conectar a la cámara con la computadora de desarrollo, uno de ellos funciona como puerto primario a 10/100/1000 MB que generalmente se conecta a la pc y puede configurarse para adquirir una dirección de un servidor dhcp, mientras que el segundo, se conoce como secundario y sólo puede ser confgurado para un ip estático.
    Te recomendaría formatear el disco duro de la cámara y reinstalar el software. Para formatear hay qe dar click derecho en la camara y elegir la opción "Format Dosk" . A partir de ahí un wizard te guiará por el formateo de la misma, será necesario reiniciarla. Es probable que por eso solo puedas ver un puerto en la cámara
    Después de ahí, una vez formateada la cámara podrás agregar nuevamente el software a la misma (click derecho>> install software)
    How do I Configure the Dual Ethernet Ports on Real-Time Controllers?
    Exito en tu aplicacion

  • Comunicación serial entre labview y pics

    Hola! Espero que alguien pueda ayudarme, bueno mi pregunta es que si es posible enviar al mismo tiempo datos entre labview y pics a través de una comunicación serial RS323

    Hola patito.
    Para realizar la comunicación serial por medio de LabVIEW, se utiliza unas funciones de alto nivel que son conocidas como VISA. VISA tiene funciones que pueden ser usadas para muchos tipos de comunicación (RS232, GPIB, VXI, USB, etc.).
    Te recomiendo que verifiques el siguiente tutorial para aprender a utilizar VISA y los recursos de National Instruments para la comunicación serial.
    How to Do a Serial Loopback Test
    Ya solo quedaría que realizaras la programación en el pic para enviar y transmitir datos de forma serial (por lo general por los puertos TX y RX del pic) y, si es necesario, utilizar un transceiver para tener los niveles requeridos para la comunicación por medio de RS-232.
    Espero sea de tu ayuda.
    Saludos
    Saludos
    Francisco S.
    National Instruments
    Field Engineer
    www.ni.com/soporte

  • Comunicaci​on spartan (FPGA) y OPC server

    buenas 
    me gustaria saber si puedo comunicar la targeta spartan con el OPC server de labview y como lo puedo hacer ademas quisiera saber si el VI creado en la espartan lo puedo transferir a un VI creado en opc server, ya que he intentado con variables locales y compartiendo la variable y nada.
    mas especicificamente me gustaria saber si se pueden compartir estas señales para que labview que comparte datos con el  OPC me invie una senal al PLC.
    muchas gracias 
    Saludos

    Hola buen día, 
    Normalmente el uso de un OPC Server sería la mejor alternativa ya que la comunicación con el PLC se hace de una manera más intuitiva. Sin embrago, dependiendo el PLC, se puede establecer comunicación con él utilizando otros medios. Por ejemplo si el dispositivo cuenta con comunicación por algún protocolo serial, se puede utilizar las funciones de VISA en LabVIEW para establecer la comunicación. El único inconveniente es que se tiene que tener un conocimiento profundo acerca de los comandos aceptados. 
    Leyendo un poco acerca del PLC, otra posible ruta sería implementar la comuncación por medio de TCP/IP, aunque sucede lo mismo que con el protocolo serial (se necesita saber bien los comandos de comunicación). Te agrego un documento de comunicación utilizando TCP. 
    http://www.ni.com/white-paper/2710/en
     Espero esto sea de utilidad, 
    José Alberto G.
    National Instruments
    ELP Support Engineer
    www.ni.com/soporte

  • Comunicación OPC entre un PLC Festo (OPC EasyServer) con Labview

    Ayuda.....Necesito comunicar un PLC Festo Fc 640 con Labview, yo tengo el software OPC EasyServer pero no se cómo comunicarlo con un VI.....
    Gracias.....

    Mmm... si tienes el software OPC para el equipo que quieres comunicar, LabView debe detectarlo al momento de querer conectar un control/indicador con alguna variable de tu equipo... El OPC es el que se ocupa de la conexión al equipo (PLC Festo en tu caso), es ahí donde tienes que configurar parámetros de comunicación tales como baudrate, paridad, stopbits, etc (asumiendo comunicación serial) y este software OPC server es directamente comunicable con LabVIEW... Sólo tienes que colocar tu control/indicador en el front panel >> [click derecho] >> Data Operations >> Datasocket connections... En la ventana que aparezca, al lado de la casilla "Connect to..." seleccionar el botón "Browse...", luego "Browse Measurement Data..."  y a continuación te aparece una lista de los servidores de datos registrados en tu máquina... busca y selecciona el parámetro que quieres y ya está.
    Ojo: la secuencia de pasos que menciono son para LabVIEW 7.1 (es la versión que yo tengo) debe ser igual o más fácil en versiones más recientes.
    Espero te sirva este comentario...
    Saludos!!

  • Comunicaci​on PLC

    Hola,
    Tengo un plc Siemens S7-1200 y quiero comunicarlo con mi Labview 2012 sin la necesidad de usar OPC Server o una tarjeta DAQ.
    He escuchado por otras fuentes que sí se puede, sin bajar un software. O en todo caso alguna alternativa con un software libre?

    Hola buen día, 
    Normalmente el uso de un OPC Server sería la mejor alternativa ya que la comunicación con el PLC se hace de una manera más intuitiva. Sin embrago, dependiendo el PLC, se puede establecer comunicación con él utilizando otros medios. Por ejemplo si el dispositivo cuenta con comunicación por algún protocolo serial, se puede utilizar las funciones de VISA en LabVIEW para establecer la comunicación. El único inconveniente es que se tiene que tener un conocimiento profundo acerca de los comandos aceptados. 
    Leyendo un poco acerca del PLC, otra posible ruta sería implementar la comuncación por medio de TCP/IP, aunque sucede lo mismo que con el protocolo serial (se necesita saber bien los comandos de comunicación). Te agrego un documento de comunicación utilizando TCP. 
    http://www.ni.com/white-paper/2710/en
     Espero esto sea de utilidad, 
    José Alberto G.
    National Instruments
    ELP Support Engineer
    www.ni.com/soporte

  • Comunicacion con un puerto serie virtual usando SPI

    Hola a todos. Podeis ayudarme con esto??
    Quiero comunicarme con un puerto serie virtual  usando SPI. Me he bajado un pack de SPI de NI, pero no estoy muy seguro de que funcione.Teneis algún ejemplo para guiarme o algún tutorial??
    Gracias.

    Hola Serrano_10,
    Los códigos ASCII son la representación numérica de los caracteres que tradicionalmente un PC es capaz de entender. Habitualmente cuando te comunicas por puerto serie, VISA realiza la conversión a tipo string, por lo que no tienes por qué preocuparte de esto. Si estás recibiendo caracteres extraños probablemente se deba a que el protocolo de comunicación con tu dispositivo utilice caracteres como ACK, SOH o STX que no tienen una representación en forma de carácter. El siguiente link contiene la tabla ASCII. Para pasar de caracteres ASCII a decimal y viceversa, te adjunto un pequeño ejemplo.
    Por último, ¿podrías adjuntar un pantallazo del error que estás registrando?
    Un saludo,
    Adjuntos:
    Untitled 2.vi ‏8 KB

  • New DVR Scheduler Bugs: Priority Settings No Longer Working, Scrolling Series Schedules is Flakey

    Hi,
    After this last HD DVR update, I have two new problems:
    1) I can no longer set the priority of most of my series schedules. I have about 100 series schedule entries, which the DVR update probably wasn't tested for.
    Now when I try to set a series priority, it LOOKS like it worked, but if I get out of DVR options and go back into Manage Recordings, 90% of the time I find that the series priority is either unchanged, or (even worse) has bounced up to some unexpected random priority - Thus, I have to search the series list  to find it - Then I cannot move it back to where it's supposed to be!
    It seems that only moving a series priority a little bit will sometimes work, but moving the series from near the top of the list to near the bottom (or vice-versa) doesn't work at all, even though it may appear like it worked until the list is refreshed (either by paging up and down the list a few times, or by exiting the DVR manager and going back in).
    2) The scrolling is messed up now in the series schedule manager - When setting Priority, as I scrool up or down from the middle of the list using the arrow or Page buttons,  the list will end unexpectedly, making it impossible to actually drag the series to the bottom or top of the list. Then if you deposit the series at the "end" of the list, suddenly the rest of the list will then magically appear (of course, the series schedule you deposited there will no longer be where you deposited it - See problem #1). Obviously the list is running out of buffer space, so the next part of the list isn't being loaded while you're in the process of changing a series priority..
    Scrolling is also messed up just scrolling through the list without changing priority: Scrolling through my series schedules USED to be very FAST and painless using the Page (Channel) up/down button, I could scroll from top to bottom of my 100 series schedules in a matter of like 5 seconds. NOW, it takes forever and is a real pain to scroll from top to bottom, because the scrolling pauses on just about every other page - As though it ran out of buffer space and is having trouble loading the next buffer.
    I have a lot of series schedule entries so all the First-run Programs are at the top of the priority list, then all the re-runs are in the bottom half of the list. That's the only way I have found to prevent Re-Runs from hijacking new programs, since there's no DVR option to prevent re-runs from inteferring with new episodes (BTW, in order for this to work, the First-Run schedule must be created first. Then a duplicate First-Run and Reruns schedule must be created - Creating them in reverse order will throw a "Duplicate" error message).
    The DVR software has always been buggy and feature-depribed, but this is rediculous - To think the programming team didn't even test the scrolling and priority of series schedules is as bad as the ObamaCare website, and that's setting a very low bar! You HAVE to test EVERYTHING when you release new updates, even if the programmers say it won't affect anything else, because from my experience programmers develop tunnel vision (been there, done that myself), and if you have more than one person on the programming team, neither programmer will communicate their changes to anyone else (been there, done that too).

    I have the identical problem after the recent software upgrade which VERIZON did to my DVR.
    In addition, I have "Manual Series" listed under the "Manage Series Recordings" section of my DVR for about 10 of the tv shows that I have tagged to be recorded weekly. Several others have reported this seemingly related problem to this forum.
    I've tried twice to report the latter problem to VERIZON's technical support staff, but met with indifference in the first attempt (a guy recommended that I replace my DVR with a new one - an utterly ridiculous suggestion), and in my second attempt I got a somewhat helpful lady who couldn't correct this glitch and was unaware of others having same problem but promised to send it up the flagpole to higher level tech folks (best action that I realistically could get).
    As I told VERIZON's techies, I likely was not the only customer experiencing these problems - and your and others postings to this forum confirm my initial hunch.  VERIZON leaves a lot to be desired in the testing of their software "upgrades".

  • I am having a major issues to report machine -G6 series

    Hi. Team
                    This is a serious customer issue that I have to report .I am Owning an HP G6 series laptop. After 7 months of purchase I am facing lots of issue with this. The system is getting stucked sometimes and the controllers  of Keyboard and mouse are not working, While the time of boot up it is making big noise. All these issues I have reported to authorized service center of HP Maha electronics(Cochin).And the engineers over there observed the issue and replaced my hard disk two times. But the fact is like I am still facing the issue. Till today I have given two times to authorized HP service center (Maha electronics )Cochin. Days after the second time repair I had gone to US and I was unable to report the issue for the third time. I recently came to India and I have reported the issue in HP authorized service center (Maha Electronic)Bangalore. But by that time I came to know that my machines warrantee got over.And they neglected my request saying it cannot be done under warrantee.
                    Team, Please think that I have reported the problem during the time of warrantee itself, And your engineers couldn’t able to repair it properly to me.Frankly speaking, They have kept my laptop more than weeks under their custody for observation. But they were failed to find out the root cause of the issue. The folks reading this mail might be thinking that this issue can be, Now because of damage of some other stuff, but it’s absolutely no, Why because, You folks can check the description of the problem with the laptop during my first repair visit(Check the slip’s issue’s reported description) With this serial no([Personal Information Removed]).And still they are not specific about the root cause. This was happened mainly in (Maha Electronics)Cochin. They are not specific about the issue changing all parts by parts without any logical sense.
                    Folks, Act sensibly to your customer. It’s because of deep sadness I am saying these words. I was having 100% trust with your product(HP).But Now ,if anyone ask me about to which laptop to go with, I am having no words to tell them. How can I believe your engineers and give my words to my fellow beings.
    Thanks And Regards.
    Nijil [Personal Information Removed]

    Sorry to say we folks are not HP employees and have no access to your service records so there is not much help we can provide other than moral support

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • SSRS show trend chart over column chart per series groups

    Need help in designing following report in SSRS, where I have a chart report with 2 category grouping fields and 1 series group field (as with category grouping, the reason being, i need to show columns in group of 4 joined together based on their grouping
    on top) .
    Below are my queries
    1. how to show my category grouping values on top of chart (showing group in different color) and series grouping values on bottom of chart (under each bar)
    2. I need to show trend line over each series group data.
    For example, First category group is over hotel name, second category group is over room type (deluxe, executive & suite) and one Series group over week number (for a month report), and the chart value is total occupancy (per hotel per room type per week
    number). Now for point 1, Hotel name and room type needs to be on top of the column (total occupancy) chart, where a week iteration number (1,2,3,4 for a month) at the bottom of the chart under every column.
    And for point 2, I need to show trend line per room per week occupancy was improved or not.
    Regards, Sujay

    Hi Sujay,
    According to your description, you want to display the two category group values at the top of the total occupancy value. Also you want to create a trend line over series values.
    For your first requirement, you can specify the Label data as a combination of two category group values and total occupancy values. Then change the location of series group value legend. Please refer to below screenshot.
    For your second requirement, you can add additional total occupancy values to the Chart Data panel, then change the chart type as Smooth Line.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • SSRS Chart group dataset by Year (series groups)/Month (category groups) force intervals to start at JAN?

    Hi all,
    trying to figure this out in REPORT BUILDER, but I guess I can go to VS if needed...
    I've got a data set that says "sales" and its basically order summarycontaining:
    id, dateplaced, and other stuff...
    I want to use this dataset to show trendline for annual qty of orders
    created line chart with "countDistinct(id)" as the series for X
    category groups = groupby "=Month(dateplaced)" and label "=MonthName(Month(dateplaced)"
    series groups = group by "=Year(dateplaced)" and label the same.
    I think this is working as intended, please correct if not.
    The PROBLEM I'm seeing is that since my dataset returns data starting around september so my "axis" starts in september... I really would prefer it starts at Jan and ends in December... I can't see any way to do this...
    The only things I could think of are;
    put fake data in dataset that returns "empty" values for jan in the first year of data...
    change the query completely to make sure tehre are "year" "month" groupings... somehow...
    but both of these approaches seem to be "hacky" and not very maintainable or clear...
    Help!

    Hi noJedi,
    According to your description, you want to you have the category group in your chart always start from January. Right?
    In Reporting Services, when we set category group, the records will sort by the sequence of data in database by default. However, we can apply expression in
    Sorting so that those records can sort by the month. We have tested your scenario in our local environment, here are steps and screenshots for your reference:
    1. Create a chart and put the corresponding expression into category and series group.
    2. Right click on category group. Go to Sorting tab. Put the expression below into sorting expression.
    3. Save and preview. The result looks like below:
    Reference:
    Sort Data in a Data Region (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How do I print #12 envelopes with HP Officejet 6500 E709n Series printer?

    When I try to print 4.75" x 11" (#12 envelopes) on my HP Officejet 6500 E709n Series printer, it gives an error msg. and will not print. Is there a work around for this, or do I have to use #10 size and make it do?
    Win XP pro, MS word.

    You could try creating 'paper' the size of the #12 envelope, and try that possibly.
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

Maybe you are looking for

  • Refreshing subreport data on change of group in the main report

    I have created three comma delimited strings in a subreports and then introduced them to the main report. The subreports are simple with no groups. I have one subreport for Authors, one for Departments and one for Schools. This is ok if I filter the

  • IMovie problem re: converted files. Also question about rotating a video.

    1. I convereted a .avi file to .mp4 and I still cannot open the file in iMovie, is it because i converted the file? What can I do about this? 2. Can I rotate a video clip using iMovie? I can't seem to find any software to do this, any help would be a

  • Email attachments to foreign countries

    Can anyone suggest a decently simple way to limit email attachments from my 2007 exchange server to foreign countries?  And furthermore limit ALL emails to locations in certain countries (China, Russia, North Korea, Cuba, etc.)?  I just can't seem to

  • Hot to make a broken G5 into external display

    I have installed a 20" G5 display into my G4 (lamp style). The screen fit right in and I am using a $30 inverter from ebay. I was originally concerned the the LVDS G5 would not work with the TMDS G4 but it does. I was going to use this as an external

  • How to add idocs to SLD? File adapter resend file? List of idocs?

    Hi Everybody,             Can someone pls help me find answers to the following: 1) If i need to use idocs in my integration scenario, how do i specify them in my sld? 2) Also in file adapter the incoming file is stored in a directory. If the file is