Envio de Trem de Pulsos pela porta SERIAL

Olá pessoal. Eu preciso enviar  trem de pulsos de frequencia de 1Hz  com tempo em nível alto de 5us (micro segundos) durante uns 30 minutos  pelo pino 3 da porta serial ( Tx ). Ja montei o circuito de conversao de RS232 para TTL. E no programa ja fiz a rotina basica de envio de sinal pela porta serial e ja constatei seu perfeito funcionamento.  O meu problema é que nao consigo enviar um NIVEL 0 para a saida. No bloco respensavel pela escrita VISA SERIA WRITE o valor que coloco é representado em ASCII e nao consigo enviar um nivel logico zero na saida. Ja consultei a tabela e o codigo NUL que representa os bits 0 nao sai. Tentei usar o VI BREAK mas ele nao satisfaz meu projeto pois mantem o nivel baixo somente por 500ms e ocorre um certo delay.
Resumindo COMO ENVIO UM BIT ZERO PARA SAIDA PELO VISA SERIAL WRITE EM ASCII??? Desejo que minha saida fique em zero por alguns segundos.
Obrigado pessoal. Em anexo segue meu programa.
Anexos:
serial.vi ‏10 KB

Oi Thiago,
Na saída Serial, todos os valores '0' representam valores positivos e todos os '1' representam valores negativos. Para ficar mais fácil de entender, lembre que o MSB determina o sinal do valor:
0xxxxxxx -> positivo
1xxxxxxx -> negativo
Este link fala um pouco mais sobre como medir os valores da porta serial e aborda esse assunto (as imagens não estão abrindo, mas você consegue abrí-las pelos arquivos em anexo):
http://digital.ni.com/public.nsf/websearch/79B995C3638F4177862572C900593631?opendocument&Submitted&&...
Para você que está trabalhando com comunicação serial, é legal também manter esse guia:
http://www.ni.com/pdf/manuals/371253b.pdf
Espero ter ajudado!
Ricardo Ramos
Engenheiro de Vendas - Sul
National Instruments Brasil

Similar Messages

  • VISA Configure Serial Port / Serial Instr

    What's the difference between VISA Configure Serial Port and VISA Configure Serial Port (Serial Instr)?
    LabView 7.0 Help gives no comprehensive explanation:
    You can use this polymorphic VI to initialize a serial port using the Instr VISA class or Serial Instr VISA class.
    Thanks,
    Greg1997

    Hi Greg1997,
    From what I have seen in LabVIEW 7.1, there is only one VISA Configure Serial Port function block.  It does have a polymorphic VISA Resource Name input to accept either an Instr VISA class reference or a Serial Instr VISA class reference.  The Instr class is a more general class than the Serial Instr VISA class (so there are more specific attributes available to the Serial Instr VISA class), but both references can be used with the VISA Configure Serial Port block.  Hope this helps!
    Regards,
    Anna M.
    National Instruments

  • Problemi con eseguibile lettura da porta seriale

    Buongiorno,
    ho creato un vi che richiama una subvi per la ricerca automatica della porta seriale. Una volta creato l'exe non avviene la comunicazione della porta seriale, se invece lo lancio dal mio pc ove è installato labview funziona...ho anche installato il VISA runtime engine 5.3 (posseggo la versione di labview 2011)...qualche idea?!? grazie mille!!!
    invio in allegato l'immagine del subvi..
    Attachments:
    Immagine111.png ‏31 KB

    Buongiorno,
    Ti consiglierei di seguire le indicazioni delle seguenti KB.
    My VISA Executable Does Not Run on a Nondevelopment Machine
    http://digital.ni.com/public.nsf/allkb/DB5E81EAFC9A463886256AA8005EA2B1?OpenDocument
    How Can I Include Additional Installers with My LabVIEW Applications' Installer?
    http://digital.ni.com/public.nsf/allkb/E09BA0E2F31D304F86256A640070058E?OpenDocument
    What Additional Files Are Required with an Executable Created with the LabVIEW Application Builder?
    http://digital.ni.com/public.nsf/websearch/E11297C4EECAB110862565A900648083?OpenDocument
    Saluti
    Enrico D.

  • Acquisizio​ne da porta seriale

    Buona sera,
    sto facendo un progetto per l'esame di misure all'università che prevede l'acquisizione di segnale tramite arduinoDUE ne faccia la FFT e la invii sulla seriale. Da qui tramite labview grafico o il segnale o la FFT corrispondente in base ad un pulsante collegato ad arduino e che mi dia la possibilità di scegliere cosa graficare. Ora visto che non posso andare in facoltà perché lavoro il prof. ha detto di generare il segnale tramite DAC e poi acquisirlo su un pin analogico. Con l'oscilloscopio a lavoro ho visto cheil segnale si genera correttamente. Il problema nasce quando grafico tramite labview in quanto la frequenza del segnale acquisito non cambia anche se modifico la frequenza, se cambio il baud rate ecc. ecc. Il segnale che visualizza labview è una sinusoide, cosa giusta, ma ha un periodo di 120 secondi. Sto da 10 giorni e non riesco ad andare avanti. Qualcuno mi può aiutare?
    Grazie mille

    Ciao  Lamber_86,
    ti ringarzio per  suggerimenti precendeti sono stato in laboratorio ho testa e funziona "quasi" tutto. Infatti partendo con un segnale con una data forma acquisisco e visualizzo in maniera corretta. Il problema nasce se modifico la forma del segnale (tipo da sinusoidale  a quadrato), la risposta da parte di Labview è mooolto lenta nonostante io abbia impostato il baud rate a  115200. Con un piccolo programmino ho letto la porta seriale ed al modificare della forma del segnale trasmette i nuoni valori. Dove sbaglio ?
    Grazie mille
    Luigi V

  • What do I port serial driver to Intel Solaris8?

    How do I port a serial driver from linux to intel solaris8 ?
    Because I can't find the serial driver sample, so it is difficult
    to make it work in intel solaris8.
    Are there someone knows how to handle? or any suggestions?
    Thanks.

    That kind of depends. Very old versions of LabVIEW only had one serial driver called serpdrv and several LabVIEW functions that called it. There were some advantages to using these when you built an exe since serpdrv was same and easily included with the exe distribution. Several years ago, a new communication API called VISA was introduced. VISA gave programmers a single driver to communicate with serial, gpib, VXI, ethernet, and now USB instruments. The downside to VISA for built applications was that the installation of the driver was a bit more difficult to include and it required quite a bit more disk space. I've preferred using VISA for quite a long time and since I typically use a mix of serial and gpib, VISA made the most sense to me. Now, in Lab
    VIEW 7, VISA is the only supported interface and NI has made the installation easier and the disk requirements smaller. So, if you're looking forward, I would recomend the VISA functions - VISA Write to send data to the serial port, and VISA Read to receive data. The older functions can be found on the I/O Compatability>Serial Compatability palette. LabVIEW 7 has a compability palette as well but they are VISA functions writeen to look like the old ones.

  • HP 6550b BIOS Unabled COMM PORT (SERIAL)

    Hi,
    I have an HP Probook 6550b with BIOS version F.23, I can see my Ricoh PCI connections like USB, SD/MMC Reader and the 1394 Port, but I can't found my Serial COMM PORT??
    Thx for your Help!

    Hi:
    Did you install the AMT driver?
    http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3688870&sp...

  • Accesso a porta seriale con labview, scientific linux e interfaccia usb-rs232

    Ho un pc con SLC5, con interfaccia USB-RS232 e sto cercando di parlare con fieldpoint. Visaconf vede correttamente 4 interfacce (/dev/ttyUSB0, 1, 2, 3), mappate su ASRL1::INSTR .. ASRL4::INSTR.
    Se provo ad usare "Advanced Serial Write and Read.vi", va sempre in timeout.
    Se provo ad aprire "Optomux Send General Command.vi", lo trovo "rotto" (il parametro "VISA resource name" è connesso al "Port number" di "FPOptoHandler.vi".
    Mi manca qualcosa ? Oppure cosa c'e' di sbagliato ?

    Salve,
    provi a verificare la compatibilità con i driver al seguente link:
    What Linux Distributions Do National Instruments Drivers and Software Support?
    http://digital.ni.com/public.nsf/allkb/4857A755082E9E228625778900709661?OpenDocument
    e se il seguente esempio le risulti non corrotto:
    Programmatically Identify VISA Resource of cFP-1808
    https://decibel.ni.com/content/docs/DOC-23375
    Buon lavoro e buona giornata.
    A.P.

  • Is the visa i/o port serial or parallal

    I am trying to understand if the VISA works in serial/parallal mode so I can send ASCII data on it, and convert it if necessary.

    Correction: It does work with Serial and Parallel Ports
    See: http://zone.ni.com/reference/en-XX/help/371361B-01/lvinstio/visa_serial_parallel_ports/
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • Select serial comm port in sub vi during run-time

    Hi, would like to be able to select the comm port (serial RS232) in sub vi to use in main vi during run time. How can I do this? Have tried and failed, for on startup an error occurs because I have not selected a port yet. An example would be invaluable! Thanks alot, Madri

    Hi Madri !
    What you could do is to intercept the com errors, and open a configuration vi either if there is an init error or if the user has pressed a "Change port" boollean (or menu...). Do not forget to close the previously opened serial port, and to open/init the new one. I have attached a small example of this idea.
    Of course com errors can have various origins, and do not require always to change the serial port. So, you have some additional work to do.
    Hope this helps
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Select_port.vi.zip ‏12 KB
    Com_with_serial_init_vi.vi.zip ‏13 KB

  • Unable to establish serial connection between 2 serial ports of same laptop

    I am trying to run "Basic 2 port serial write and read.vi" from the labview example using the 2 different com ports of same laptop. My serial cable is fine. It has passed loopback test. Also I have successfully communicated with the microcontroller(via max232) using the same cable. Still In the given example, I am not recieving character that I have written in the "string to write" window. I have confirmed the com port numbers. The cable I am using is simple 3 wire tx-rx and ground cable. I have also tried to connect two ports on two different pc's that also doesnt work. What may be the problem? I can't see any.                 

    Are you changing the data being sent?  As currently configured, you need to make sure the \n stays at the end of the data.  To avoid this, turn the termination character off (input on the top of the Configure Serial Port, wire a FALSE constant to it).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there any TPC or HMI which have six COM port or serial port

    i like to take data serially through six different com port/serial port.There is any TPC or HMI awailable which has six serial port.

    parthabe wrote:
    I know she is Neetu Singh from the CV attached here, but not sure if she got fired from NI India because of that job application.
    PS... NI hasn't fired a single soul till date...

  • Hello Forum, you need a serial ports for software icprog to program EPROM and Pic

    Hello Forum, you need a serial ports for software icprog to program EPROM and Pic.I was wondering if this or a similar card is compatible with my Lenovo Desktop h50-50 -->  -> PCI-E 2 serial ports and 1 parallel port PCI-Controller Card 3 Port ► http://fli.zz.mu/cut/scheda-pci-e-2-porte-seriali-1-porta-parallela .
    My my Lenovo Desktop h50-50 upgrade to win 10,  If it is not compatible to win 10. I could use it too virtualizing win Xp? Thank since TIME FOR ANSWERS, I apologize for my bad English.
    THANK Joe  

    Unfortunately, no Sanyo phones are iSync compatible so you will not be able to synchronize your Contacts and Calendars with the phone.
    Also, you may have problems with the Bluetooth adapter you purchased, as the only one officially supported by Apple for use with Macs is the D-Link DBT-120.
    The Official Apple list of iSync compatible devices is here:
    http://www.apple.com/macosx/features/isync/devices.html
    It's always a good idea to check this list before purchasing a new phone.
    Other phones are supported by third party plugins from here and here. But still no Samsung, Sanyo, LG etc. who all use thier own proprietary syncing protocols rather than the industry standard SyncML. These manufacturers also don't provide Mac software with their phones like the do for Windows users.
    I'm afraid you're not going to have much luck if you stick with the Sanyo. I would seriously consider taking it back and swapping it for one of the handsets on the above linked pages. Personally I would recommend a Sony Ericsson model. I've always had excellent Mac compatibility with those.

  • Usb port not working after yosemite update please help

    ive got an early 2011 macbook pro i5. and one of my usb stopped working. if i reset my  computer it works for a while and then stops again. all these after yosemite update please i really need help on this.. and also when ever im in the middle of something it keeps crashing and saying these things below after i booting back up. ive tried several things, didnt work, tried repairing disk permissions. please anybody with any idea help me!
    Anonymous UUID: 
    CCC4DCA9-48E9-4692-250B-488588FCC69E
    Sun Nov  9 17:58:17 2014
    *** Panic Report ***
    panic(cpu 0 caller 0xffffff802a005eb2): "Possible memory corruption: pmap_pv_remove(0xffffff803b8db998,0x7fff7360f000,0x6d654, 0x6d654d64, 0xffffff8031663cc4, 0xfffffeb38ae0f078): null pv_list!"@/SourceCache/xnu/xnu-2782.1.97/osfmk/i386/pmap_internal.h:768
    Backtrace (CPU 0), Frame : Return Address
    0xffffff8031663b80 : 0xffffff8029f3a811
    0xffffff8031663c00 : 0xffffff802a005eb2
    0xffffff8031663cf0 : 0xffffff802a0065e5
    0xffffff8031663d50 : 0xffffff8029fb6b4a
    0xffffff8031663e60 : 0xffffff8029facd2c
    0xffffff8031663e90 : 0xffffff8029f5c747
    0xffffff8031663ed0 : 0xffffff802a3c45ff
    0xffffff8031663f40 : 0xffffff802a3c425c
    0xffffff8031663f50 : 0xffffff802a44dcb2
    0xffffff8031663fb0 : 0xffffff802a03ac46
    BSD process name corresponding to current thread: suhelperd
    Mac OS version:
    14A389
    Kernel version:
    Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64
    Kernel UUID: 89E10306-BC78-3A3B-955C-7C4922577E61
    Kernel slide:
    0x0000000029c00000
    Kernel text base: 0xffffff8029e00000
    __HIB  text base: 0xffffff8029d00000
    System model name: MacBookPro8,1 (Mac-94245B3640C91C81)
    System uptime in nanoseconds: 7052072843826
    last loaded kext at 6483411185500: com.huawei.driver.HuaweiDataCardActivateDriver    1.0.12 (addr 0xffffff7fac6ba000, size 16384)
    last unloaded kext at 6604174049015: com.apple.driver.AppleUSBCDC    4.2.2b5 (addr 0xffffff7fac717000, size 16384)
    loaded kexts:
    com.huawei.driver.cdc_ncm    2.7.2f16
    com.huawei.driver.dc_net    1.0.2
    com.huawei.driver.cdc_acm    2.6.2f17
    com.huawei.driver.cdc_usb_bus    1.0.3
    com.huawei.driver.HuaweiDataCardDriver    4.25.45
    com.apple.driver.AppleHWSensor    1.9.5d0
    com.apple.driver.AudioAUUC    1.70
    com.apple.driver.AGPM    100.14.37
    com.apple.filesystems.autofs    3.0
    com.apple.iokit.IOBluetoothSerialManager    4.3.0f10
    com.apple.driver.AppleOSXWatchdog    1
    com.apple.driver.AppleMikeyHIDDriver    124
    com.apple.driver.AppleHDA    266.5
    com.apple.driver.AppleMikeyDriver    266.5
    com.apple.driver.AppleSMCLMU    2.0.4d1
    com.apple.driver.ApplePolicyControl    3.7.21
    com.apple.driver.AppleLPC    1.7.3
    com.apple.driver.AppleUpstreamUserClient    3.6.1
    com.apple.iokit.IOUserEthernet    1.0.1
    com.apple.Dont_Steal_Mac_OS_X    7.0.0
    com.apple.driver.AppleHWAccess    1
    com.apple.driver.AppleHV    1
    com.apple.driver.ACPI_SMC_PlatformPlugin    1.0.0
    com.apple.driver.AppleIntelHD3000Graphics    10.0.0
    com.apple.driver.AppleIntelSNBGraphicsFB    10.0.0
    com.apple.driver.AppleBacklight    170.4.12
    com.apple.driver.AppleMCCSControl    1.2.10
    com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport    4.3.0f10
    com.apple.driver.AppleSMCPDRC    1.0.0
    com.apple.driver.AppleThunderboltIP    2.0.2
    com.apple.driver.SMCMotionSensor    3.0.4d1
    com.apple.driver.AppleUSBTCButtons    240.2
    com.apple.driver.AppleUSBTCKeyboard    240.2
    com.apple.driver.AppleIRController    327.5
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless    1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib    1.0.0d1
    com.apple.BootCache    35
    com.apple.iokit.SCSITaskUserClient    3.7.0
    com.apple.driver.XsanFilter    404
    com.apple.iokit.IOAHCIBlockStorage    2.6.5
    com.apple.driver.AppleUSBHub    705.4.1
    com.apple.iokit.AppleBCM5701Ethernet    10.1.2b3
    com.apple.driver.AppleFWOHCI    5.5.2
    com.apple.driver.AppleSDXC    1.6.5
    com.apple.driver.AirPort.Brcm4331    800.20.24
    com.apple.driver.AppleAHCIPort    3.0.7
    com.apple.driver.AppleUSBEHCI    705.4.14
    com.apple.driver.AppleSmartBatteryManager    161.0.0
    com.apple.driver.AppleRTC    2.0
    com.apple.driver.AppleACPIButtons    3.1
    com.apple.driver.AppleHPET    1.8
    com.apple.driver.AppleSMBIOS    2.1
    com.apple.driver.AppleACPIEC    3.1
    com.apple.driver.AppleAPIC    1.7
    com.apple.driver.AppleIntelCPUPowerManagementClient    218.0.0
    com.apple.nke.applicationfirewall    161
    com.apple.security.quarantine    3
    com.apple.security.TMSafetyNet    8
    com.apple.driver.AppleIntelCPUPowerManagement    218.0.0
    com.apple.iokit.IOSCSIBlockCommandsDevice    3.7.0
    com.apple.iokit.IOUSBMassStorageClass    3.7.0
    com.apple.AppleGraphicsDeviceControl    3.7.21
    com.apple.kext.triggers    1.0
    com.apple.iokit.IOSerialFamily    11
    com.apple.driver.DspFuncLib    266.5
    com.apple.kext.OSvKernDSPLib    1.15
    com.apple.iokit.IOAudioFamily    200.6
    com.apple.vecLib.kext    1.2.0
    com.apple.driver.AppleHDAController    266.5
    com.apple.iokit.IOHDAFamily    266.5
    com.apple.iokit.IOFireWireIP    2.2.6
    com.apple.driver.AppleSMBusPCI    1.0.12d1
    com.apple.iokit.IOSurface    97
    com.apple.driver.IOPlatformPluginLegacy    1.0.0
    com.apple.driver.AppleGraphicsControl    3.7.21
    com.apple.driver.AppleBacklightExpert    1.1.0
    com.apple.iokit.IONDRVSupport    2.4.1
    com.apple.driver.AppleSMBusController    1.0.13d1
    com.apple.iokit.IOGraphicsFamily    2.4.1
    com.apple.iokit.IOBluetoothHostControllerUSBTransport    4.3.0f10
    com.apple.iokit.IOBluetoothFamily    4.3.0f10
    com.apple.driver.IOPlatformPluginFamily    5.8.0d49
    com.apple.iokit.IOUSBUserClient    705.4.0
    com.apple.driver.AppleSMC    3.1.9
    com.apple.driver.AppleUSBMultitouch    245.2
    com.apple.iokit.IOUSBHIDDriver    705.4.0
    com.apple.driver.AppleUSBMergeNub    705.4.0
    com.apple.driver.AppleUSBComposite    705.4.9
    com.apple.iokit.IOSCSIMultimediaCommandsDevice    3.7.0
    com.apple.iokit.IOBDStorageFamily    1.7
    com.apple.iokit.IODVDStorageFamily    1.7.1
    com.apple.iokit.IOCDStorageFamily    1.7.1
    com.apple.iokit.IOAHCISerialATAPI    2.6.1
    com.apple.iokit.IOSCSIArchitectureModelFamily    3.7.0
    com.apple.driver.AppleThunderboltNHI    3.1.7
    com.apple.iokit.IOThunderboltFamily    4.2.1
    com.apple.iokit.IOEthernetAVBController    1.0.3b3
    com.apple.iokit.IOFireWireFamily    4.5.6
    com.apple.iokit.IO80211Family    700.52
    com.apple.driver.mDNSOffloadUserClient    1.0.1b8
    com.apple.iokit.IONetworkingFamily    3.2
    com.apple.iokit.IOAHCIFamily    2.7.0
    com.apple.iokit.IOUSBFamily    705.4.14
    com.apple.driver.AppleEFINVRAM    2.0
    com.apple.driver.AppleEFIRuntime    2.0
    com.apple.iokit.IOHIDFamily    2.0.0
    com.apple.iokit.IOSMBusFamily    1.1
    com.apple.security.sandbox    300.0
    com.apple.kext.AppleMatch    1.0.0d1
    com.apple.driver.AppleKeyStore    2
    com.apple.driver.AppleMobileFileIntegrity    1.0.5
    com.apple.driver.AppleCredentialManager    1.0
    com.apple.driver.DiskImages    389.1
    com.apple.iokit.IOStorageFamily    2.0
    com.apple.iokit.IOReportFamily    31
    com.apple.driver.AppleFDEKeyStore    28.30
    com.apple.driver.AppleACPIPlatform    3.1
    com.apple.iokit.IOPCIFamily    2.9
    com.apple.iokit.IOACPIFamily    1.4
    com.apple.kec.corecrypto    1.0
    com.apple.kec.Libm    1
    com.apple.kec.pthread    1
    Model: MacBookPro8,1, BootROM MBP81.0047.B04, 2 processors, Intel Core i5, 2.3 GHz, 4 GB, SMC 1.68f96
    Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
    Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
    Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.98.100.24)
    Bluetooth: Version 4.3.0f10 14890, 3 services, 19 devices, 2 incoming serial ports
    Serial ATA Device: ST9320325ASG, 320.07 GB
    Serial ATA Device: HL-DT-ST DVDRW  GS31N
    USB Device: Hub
    USB Device: HUAWEI Mobile
    USB Device: IR Receiver
    USB Device: FaceTime HD Camera (Built-in)
    USB Device: Hub
    USB Device: BRCM2070 Hub
    USB Device: Bluetooth USB Host Controller
    USB Device: Apple Internal Keyboard / Trackpad
    Thunderbolt Bus: MacBook Pro, 20080d.0

    I have the same problem when I updated to OS X 10.10 I lost both my USB ports as far as they will not recognize anything that I plug into them.  The power part of the USB seams to work since it will recharge my Striiv Touch but nothing shows up when you connect anything to the ports.
    I have tried a number of things from rebooting, trying other usb devices that work on other systems with no problems but will not work on my Macbook Pro.
    Any Help out there?
    Hardware Information: ℹ️
    MacBook Pro (Retina, 15-inch, Late 2013) (Verified)
    MacBook Pro - model: MacBookPro11,3
    1 2.3 GHz Intel Core i7 CPU: 4-core
    16 GB RAM Not upgradeable
    BANK 0/DIMM0
    8 GB DDR3 1600 MHz ok
    BANK 1/DIMM0
    8 GB DDR3 1600 MHz ok
    Bluetooth: Good - Handoff/Airdrop2 supported
    Wireless:  en0: 802.11 a/b/g/n/ac
    System Software: ℹ️
    OS X 10.10.1 (14B25) - Uptime: 1:43:41
    USB Information: ℹ️
    Apple Internal Memory Card Reader
    Apple Inc. BRCM20702 Hub
    Apple Inc. Bluetooth USB Host Controller
    Apple Inc. Apple Internal Keyboard / Trackpad

  • Problem with serial communicat​ion PLEASE HELP

    Hello everybody !
    I'd like to ask You for some feedback on my wierdo problem that I got with my program.
    I have built a device that detects changes in magnetic field. It is used for detecting vehicles passing it on a highway. Generally the main components communicate with each other by RS-485 protocol, but I would like to connect the device to a PC. To do so I am using a RS-232 protocol (I have a RS485=RS232 hardware converter).
    Now, I made the program (even two), which generally works, BUT some wierd things are going on sometimes; it happens that I have a problem to get a communication (after that, resetting the device by un-powering it helps, sometimes I have to restart the PC as well) but overall it happens quite not so often. The project itself is for passing one of my subject on the university - so I have to run the whole thing over there, here comes another problem : the program did not work on all of the bunch of PC's that are there. Same thing happens on my notebook. The effect of 'non working' is : I am recieving same data packet that is beeing sent... BTW : notebook does not have a RS232 port and I am using a USB-RS232 calbe converter (to count it out from the reason of problems I have checked it on my main PC and it works almost fine - almost because ocasionally I am getting the same sympthomps as I mentioned before ).
    Other problem is, when it works, that I am loosing communication for couple of hundreds of miliseconds and then it comes back to normal (i can see it on the osciloscope).
    I alredy looked for some answears here and there, and I found some suggestions about using 'buffer cleaning method', unfortunatelly I kinda do not know how to do it, and might that help anyways ?
    I also thought about using VISA drivers, but I am having trouble with it as well - the damn thing just does not work.
    My very bling guess is that everyting that I am expierencing is about using the communication protocol and seting it right. I am attaching both of the programs, PLEASE anyone pretty pretty help I totally ran out of ideas and knowledge and day after day I am turning it on and off on my PC and notebook hoping some miracle will occour ... 
    Many many thanks in advance !
      Best regards
                    Tom
    P.S. the program is very unfinished (man things are just put in), the main thing I am struggling now is getting, and setting the communication protocol right.
    Attachments:
    detektor_3_2.vi ‏141 KB

    The biggest problem I see is in the sequence:
    Write out a string.
    Wait 50 mSec.
    Ask how many bytes have been received.
    Read that many bytes.
    Can you guarantee that the data can make a round trip in 50 mSec?
    You should know that the SERIAL PORT WRITE completes NOT when the data has been sent out the port, but when it has been BUFFERED for sending. In other words it returns and starts the timer BEFORE it is actually sent.
    Also, given that there are 232 -> 485 --> USB conversions involved in both directions, I would bet that you are sometimes not allowing enough time for the data to get back.
    If you can control the protocol of what gets sent back, I would change your receiving logic. I think you should check for a carriage return or some other delimiter, and not react until you get that character (or until a reasonable timeout expires).
    In other words, try synchronizing the two ends. Something like:
    N = Get # bytes at port
    Read N bytes from port (flush any characters waiting).
    Write out command string.
    TimeLimit = NOW + 1000 mSec (or whatever)
    S = ''; (Working string)
    repeat
    N = #Bytes at Port
    If N > 0
    S = S + Read N Bytes
    Found = Search String for Delimiter
    until Found or (Now > TimeLimit)
    If Found, parse string S
    You are also re-initializing the port (SERIAL PORT INIT) every time thru the outer loop - that's unnecessary.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Do I need a NI serial device?

    I am working on an application which involves reading pressure data from two pressure gauges (differential and vacuum).
    My PC has two free serial ports. My questions:
    1) Can I use the PC serial ports or is it advisable to opt for a NI 2-port serial device? Reason?
    2) If you suggest that I go ahead with existing PC serial ports, then, can I still use the power of LabVIEW and VISA to read and display data from these ports?
    I have LabVIEW 6.1 professional.
    Thanks!
    - Gurdas
    [email protected]
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Thanks Chris. That helped!
    Find below replies to your inputs. Feel free to provide any further inputs and suggestions.
    - All devices are RS-232
    - No. All devices are slower than 115.2K
    - No, we do not need deep FIFOs. The application is simple and involves acquiring data from two pressure gauges at slow intervals of say once every 5 minutes.
    - I am not sure. What do you advise?
    Do you think I need to invest in NI hardware?
    Can I save money by using built-in COM ports and still leverage the power of NI LabVIEW?
    - Gurdas
    [email protected]
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

Maybe you are looking for

  • Indexing function in Adobe Acrobat Pro

    I am currently using the 30 day trial version of the above software, and am new to the Adobe product.  I am able to import a file created in MS Publisher, but am now attempting to create an index file.  I searched on the web and found this reference

  • JNDI bindings not being replicated across servers in a cluster

    According to the Weblogic Server documentation, JNDI bindings are           automatically replicated across the servers in a cluster.           http://www.weblogic.com/docs45/classdocs/weblogic.jndi.WLContext.html#REPLIC           ATE_BINDINGS       

  • How can I store Chinese Character in MSSQL Server 2000 from JSP?

    Dear all, I've got a problem with storing Chinese Characters in MSSQL table. The list below is my setting of my project: HTML/JSP -- "charset=big5" (in both "meta" and "import page") MSSQL server -- The field of storing Chinese Characters are in nvar

  • Grant Privileges in Database Vault for DATAPUMP.

    HI, I am using ORACLE DATABASE 11g R2. I have installed/enabled DATABASE VAULT 11g on it. I have configured many user in it for privileges like 'SELECT on table','INSERT on table' ,DELETE ..... I want to give a user DATAPUMP privilege so that he can

  • A/R+payment

    My i know how can i return goods for One time customer. t present in SAP business one no copy to , copy from option i working for the same