p.erasmus
Anmeldungsdatum: 15.01.2007
Beiträge: 85
Verfasst am: 31.01.2008 23:10 Titel: Convert ASCI String to Binary
--------------------------------------------------------------------------------
Dear Abacom and users.
I have an application where I read 3 position hall sensors on a BLDC motor, the value of the 3 hall sensors range between 1 and 6
I send this value succesfully to PL over the serial port as a String and
then convert it to a Value again in PL however I would like to convert the value to a Binary value and use each bit position as a in put to the logic analyser ,by doing this I could then see the state of each hall sensor.
I could not find any Binary conversion function the A/D block function is of no use here as I can not convert the decimal value as a range of 0 to 5V which give a binary range of 256 (8bit mode)
Please help with some ideas
Thank you Peter
_________________
P.Erasmus
Automotive Engineering
http://www.wenko.ch
Switzerland
Nach oben
Mike D
Anmeldungsdatum: 03.07.2006
Beiträge: 236
Verfasst am: 01.02.2008 11:10 Titel:
--------------------------------------------------------------------------------
why can't you use the A/D-Converter?
Please explain it more specified.
Mike
Nach oben
abacom
Site Admin
Anmeldungsdatum: 30.06.2006
Beiträge: 898
Verfasst am: 01.02.2008 12:20 Titel:
--------------------------------------------------------------------------------
Yes please, I also don´t understand the problem.
Nach oben
p.erasmus
Anmeldungsdatum: 15.01.2007
Beiträge: 85
Verfasst am: 01.02.2008 13:05 Titel:
--------------------------------------------------------------------------------
I came right thank you
_________________
P.Erasmus
Automotive Engineering
http://www.wenko.ch
Switzerland
Nach oben
p.erasmus
Anmeldungsdatum: 15.01.2007
Beiträge: 85
Verfasst am: 01.02.2008 21:42 Titel:
--------------------------------------------------------------------------------
Dear Abacom and MikeD
To answer the question
The Hallsensor value is already in the digital domain
where Hall value decimal 5 == Binary in 8 bit mode 00000101if I use the A/D converter set at the range 0-5 with 8bit resolution then
5 is ==1111111 which is not the representation of the hallsensor positions
but the full 5V of the A/D which give the FF which is correct for the AD but but not for the direct Decimal to Binary conversion ,(try it convert decimal 5 to its binary equivalent with the A/D)
I came right but using labview have no other choice need the application to carry on with development work .
Best Regards
Peter
_________________
P.Erasmus
Automotive Engineering
http://www.wenko.ch
Switzerland
Nach oben
Mike D
Anmeldungsdatum: 03.07.2006
Beiträge: 236
Verfasst am: 02.02.2008 08:48 Titel:
--------------------------------------------------------------------------------
Hi
set the range from 0 to 255 in 8-bit ore 0 to 7 in 3-bit mode.
Mike
Nach oben
p.erasmus
Anmeldungsdatum: 15.01.2007
Beiträge: 85
Verfasst am: 02.02.2008 13:00 Titel:
--------------------------------------------------------------------------------
Hallo MikeD
Thank you very much I did it as you explained and it is working fine
no where in the documentation it shows that you can make the range a digital range it only shows that an analog value will be converted
Your help is really appreciated
Best Regards
Peter
_________________
Convert ASCI String to Binary
Zurück zu „STRING-Verarbeitung“
Gehe zu
- SOFTWARE-UPDATES
- ProfiLab
- ↳ PROFILAB Kundenprojekte und Aufgabenstellungen
- ↳ Einsteigerfragen / FAQ
- ↳ Darstellung / Visualisierung
- ↳ Zählfunktionen, Zeitsteuerung und Programmablauf
- ↳ Messwertverarbeitung
- ↳ STRING-Verarbeitung
- ↳ Datenschnittstellen
- ↳ Hardware-Anbindung, I/O-Schnittstellen
- ↳ (Fern-)Bedienung / Externe Eingabegeräte
- ↳ Plattformen / PC-Systeme
- ↳ Aus- und Weiterbildung
- ↳ Makros & Schaltungen
- ↳ Projekte
- ↳ Heizungssteuerung
- ↳ Ofensteuerung
- ↳ Elektrische Antriebe
- ↳ Wetter und Klima
- ↳ Kraftfahrzeugtechnik
- ↳ Lichttechnik
- ↳ Multimedia
- ↳ Messtechnik
- ↳ Haussteuerungen
- ↳ Modellbau
- ↳ Elektronik und µ-Controller
- ↳ DLL-Programmierung
- ↳ Kundenspezifische Jobangebote rund um ProfiLab
- ↳ PROFILAB SOFTWARE Support
- ↳ Thema: Frontplatte und Frontplattenelemente
- ↳ Thema: Schaltung und Bauteile
- ↳ Thema: Makros
- ↳ Thema: Compiler
- ↳ Thema: Installation, Updates, Plattformen
- ↳ Thema: Geschwindigkeit und Systemauslastung
- ↳ Thema: ProfiLab-WebServer
- ↳ Thema: Anregungen zu ProfiLab
- ↳ PROFILAB HARDWARE Support
- ↳ Thema Hardware-Beispiele / Examples
- ↳ Thema Schaltungsaufbau, EMV, Störungen
- ↳ Thema RS232
- ↳ Thema Modbus
- ↳ Thema Temperatur
- ↳ Thema Relais
- ↳ Thema Multimeter
- ↳ Thema GPIB
- ↳ Thema Portzugriffe und LPT
- ↳ Geräte: ABACOM
- ↳ Geräte: BMCM
- ↳ Geräte: Conrad / Voltcraft
- ↳ Geräte: Deditec
- ↳ Geräte: DLP-Design
- ↳ Geräte: ELV
- ↳ Geräte: Greisinger
- ↳ Geräte: H-Tronic
- ↳ Geräte: Hygrosens
- ↳ Geräte: IO-Warrior
- ↳ Geräte: Kolter Electronic
- ↳ Geräte: LabJack
- ↳ Geräte: Meilhaus
- ↳ Geräte: Quancom
- ↳ Geräte: Velleman
- ↳ Weitere Geräte
- RealView
- ↳ REALVIEW SOFTWARE Support
- ↳ Einsteigerfragen / FAQ
- ↳ Kundenprojekte
- ↳ Anregungen
- ↳ REALVIEW HARDWARE Support
- sPlan
- ↳ SPLAN SOFTWARE Support
- ↳ Thema: Bibliotheken, Bauteile und Symbole
- ↳ Thema: Schaltpläne zeichnen und bearbeiten
- ↳ Thema: Seitenverwaltung, Blätter, Formblätter, Zoom
- ↳ Thema: Import, Export und Drucken
- ↳ Thema: Installation, Versionen, Updates, Plattformen
- ↳ Thema: Anregungen zu sPlan
- ↳ SPLAN SYMBOLE - Tauschbörse
- ↳ sPlan-Symbole: Elektronikbauteile, µ-Controller, Röhren und Halbleiter
- ↳ sPlan-Symbole: Installation und Anlagenbau, SPS
- ↳ sPlan-Symbole: Andere Fachgebiete, Pneumatik, Hydraulik, Kfz, etc.
- ↳ sPlan 8.0 - Demoversion
- Sprint-Layout
- ↳ SPRINT-LAYOUT SOFTWARE Support
- ↳ Einsteigerfragen / FAQ
- ↳ Thema: Platinenherstellung / Fertigungstechnik
- ↳ Thema: Isolationsfräsen und Bohren
- ↳ Thema: Gerberdateien
- ↳ Thema: Makros und Bauteile
- ↳ Thema: Lötaugen, Pads, Leiterbahnen, Masse
- ↳ Thema: Layer, Lötstop, Umriss
- ↳ Thema: Koordinaten und Raster
- ↳ Thema: Import, Export und Drucken
- ↳ Thema: Installation, Versionen, Updates, Plattformen
- ↳ Thema: Anregungen zu Sprint-Layout
- ↳ Kundenprojekte
- LochMaster
- ↳ LOCHMASTER SOFTWARE Support
- ↳ LochMaster - Tauschbörse
- ↳ Einsteigerfragen / FAQ
- ↳ Kundenprojekte
- ↳ Installation, Updates, Plattformen
- ↳ Anregungen
- FrontDesigner
- ↳ FRONTDESIGNER SOFTWARE Support
- ↳ FrontDesigner: Anregungen
- ↳ HPGL-Export, Fräsen und Gravieren
- AudioWave
- ↳ AUDIOWAVE SOFTWARE Support
- ↳ AudioWave: Anregungen
- ... und mehr von www.electronic-software-shop.com
- ↳ Link zum ABACOM - Webshop
- ↳ USB-µPIO / netPIO
- ↳ Fimware /TEMP12
- ↳ Fimware /GPIO18
- ↳ Fimware /INCR3
- ↳ Fimware /FREQ
- ↳ Fimware /PWMIO18
- ↳ USB-ADC Messmodul, 12 Bit
- ↳ USB-LRB Relaiskarte, 8-fach
- ↳ USB-LCD Textdisplay, 4x20
- ↳ Andere Artikel
- Sonstiges
- ↳ Sonstiges