Jump to content

h4med

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

h4med's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you all specially Yen, your example was very useful!
  2. For controlling a DC motor via Labview I need a button with three states: one for turn left, second for turn right and last for stopping. I searched buttons and controllers, but all are Boolean or continuos slide and knobs, how can I make this one?
  3. khalid, thank you for introducing Portmon, that is a very useful software. by monitoring serial port this is the result: in VB: when I change scroll, on port I have: ..Length 1: 50Length 1: 51Length 1: 52Length 1: 53Length 1: 54.. as I said, and expected output changes smoothly between 0 and 255 (FF) but in LabView: these are the results: ..Length 4: 00 00 00 19 Length 4: 00 00 00 32 Length 4: 00 00 00 4B Length 4: 00 00 00 64 Length 4: 00 00 00 7D .. First, output is 4 word, and second it changes with big steps. (This is VI:) Download File:post-3628-1137220009.vi
  4. Hi oscar Problem is the number that Labview send to chip, VB send a number between 0-255, but Labview send a number between 0-10, then PWM pulse width change roughly.. I wrote VB program in less than 10 minute, but after two days I couldn't get same answer from Labview! :headbang:
  5. Thank you khalid for your very fast responses, it works, but not as smoothly as VB program do. these are VB codes: Dim a As StringOption ExplicitPrivate Sub Form_Load()MSComm1.CommPort = 1MSComm1.Settings = "9600,n,8,1"MSComm1.PortOpen = TrueEnd SubPrivate Sub HScroll1_Change()a = HScroll1.ValueMSComm1.Output = Chr$(a)Debug.Print aText1.Text = aEnd Sub (my VB app have a little bug, can you find it!?) and this is Microcontroller codes in BASIC Do B = Inkey() If B > 0 Then B = B * 4 Pwm1a = B End IfLoop (Pwm1a must be between 1 and 1024) VB divide pulse width in 255 section, but as it seems LabView just divide it into 10.
  6. Hi all My problem didn't solve yet, I tried "Type Cast" but I don't know what I should use as third input of this block and then output is rubbish characters! and I also used "03d" with format value but it doesn't work. I write a simple application with VB to test that if problem is from Microcontroller codes, but it work correctly with VB program (I have a pulse with varying width in Oscope) but when I test it with LabView the width is constant (or maybe little variation that I can't see) I attached my VI, any idea? Download File:post-3628-1136786737.vi
  7. Hi guys I want to send a number for controlling a PWM pulse, via labview to a microcontroller. i have problems with type conversions. number to send is, 1 byte, 0-255, thus is 3 characters as a string. as it seems labview just send first character, and then PWM wave didn't change much. i confused with type conversions, string to number, number to array !!! I attached a picture of my simple VI. how must i change my VI to send numbers completely?
  8. Thank you ALL! :worship: I finally by downloading "NI-VISA Version 3.4.1 for RTX/Windows 2000/XP x64/XP" could stablish my desired Rs-232 connection.
  9. Thank you for your fast responses didierj. can you address me the exact URL of "NI-DAQ" for downloading, as I understand in my eval Version "Measurement & Automation Explorer" doesn't installed.
  10. Thank U khaild, but I couldn't open your file, because my LabView version is 7.0 (evaluation version) and yours is 7.1.1 I tested this file: http://forums.ni.com/attachments/ni/170/153176/1/test41.vi from here http://www.codecomments.com/LabVIEW/message702981-1.html but I took these strange error: Error -1073807202 -> "This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input." I test all examples in examples/instr/smplserl.llb, I just get nothing or the above damn Error :headbang:
  11. Hello to masters of LabView I am a new user of LabView and trying to establish a serial connection between LabView and a Microcontroller (ATMega16), in first step I just need a very simple data transfer, without any handshake and any driver, etc. just Micro read some analog value, convert it to digital, then via rs232 send to PC, and finally LabView display and analyse these bytes. In terminals such as BASCOM and Proteus I receive bytes, but in LabView I have nothing. How can I do that as simple as possible without any confusing VISA vi?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.