Steppper motor control via RS232

hii
i am new to this stepper motor controlss section.
i am using vaccum compatible stepper motor .. the whole manual of this is ayyached alongwith..and the program made by
me is also attached along with..i had run the other stepper motor with the same code..i do not know where is the problem..
please help me..
thanks
do not hesitate to give kudos

Hey Sahil,
Thanks for posting on the forums. Hopefully this was the thread you were referring to in the Engineer Awesome ni.com/community group discussion. Sorry that you did not receive any feedback from your issue, that is fairly rare.
Anyway, in regards to the issue at hand. The fact that you are using a stepper motor is not as significant as the fact that you are communicating to your instrument (in this case I would image that it is your motor controller/drive) via RS232. I hate to point you to another resource, but the instrument control forum may be the most appropriate location for your query.
In the Engineer Awesome discussion, you mentioned that you were able to control the device through a third party application but you were having trouble doing so in LabVIEW. My first reaction after looking at your code is termination characters. Does your controller expect any sort of termination character? Also, are you sure that you are sending the same commands via LabVIEW as you are in the third party application? If you use a port sniffer application to monitor the traffic over your RS 232 connection when your third party application is running and compare that to when your LabVIEW code is running (you could use NI SPY for this when you are using NI VISA), how do the two situations compare.
If I had to guess, I would think that you are not sending commands/termination characters to your instrument that it is expecting.
Lastly, a more detailed description of what your issue is, what you have tried, and what is and isn't working would really help everyone understand what is going on and how to help. As it is, it is unclear what the issue is or what you are trying to accomplish.
Hope this helps.
-Ben
WaterlooLabs

Similar Messages

  • DC motor control via ctr1/ctr0 pwm output stops outputting after one loop through.

    Working on this project to control an H-bridge controlled
    motor using pwm output from ctr0/ctr1 for ccw and cw on the motor. A sensor detects where it is at and each cycle goes from black to white. For some reason, the motor only turns on once and then nothing comes out of the ctr outputs after that. Anytime the program is stopped and restarted it works for one cycle. Or if just the program is run at the skipcolor sub-vi. this can be run multiple time to control it properly. During the actual run it doesn't work. Any implementation device would be great. I am using the PCI-MIO-16E controller.
    Programs attached for reference.
    Attachments:
    SkipColor1.vi ‏111 KB
    MotorControl2.vi ‏99 KB
    PROJECT 2a2.vi ‏18 KB

    Hey suspencefull,
    You are probably going to have to think about re-designing your code. Your pulse train is not continually generating because you do not have it in a loop. When you use the DAQ Assistant to create a continuous pulse train, LabVIEW will prompt you if you want it to automatically add the loop. You must have deleted it or chosen not to add the loop.
    There will, however, be problems though when you add the loop back in. The SkipColor sub VI will not finishing executing until the loop is finished and therefore you will never move out of the first frame of your sequence. I would suggest redesigning your code so that these thing can occur in parallel.
    Please let me know if you have further questions.
    Regards,
    Chris Delvizis
    National Instruments

  • 2 motor control via joystick in an underwater ROV

    I have a term project.I am doing an underwater ROV with labjack U3 using Labview.I do not know how to control 2 motors with one joystick.It is too complicated.I need help.??

    I'm wondering a bit how you would use a USB data acquisition device for motion control, but as long as long as you don't use this for closed loop control it could be ok.
    But anyway. Here are some links to example that might help you. As you could imagine NI doesn't provide examples for labjack products, but you should be able to adapt the examples to your hardware:
    Joystick Inputs with DAQ Card Outputs
    Motion Control with USB Joystick
    For more example code and tutorials please search ni.com for "joystick LabVIEW"
    Kind regards,
    Jochen

  • Need to control waterbath temp using labview via RS232

    HI,
    I am new to labview. I have labview 6.1. I need to control a thermo RTE7 water bath temp.  controler using labview.
    The water bath has to be connected to computer via RS232 port and the commands have to be given via binary values.
    The users manual for the bath has "hex" bytes that are to be converted
    to binary values to be passed to bath. If anyone has done this before
    or anyone can help me on this please let me know. Thanks,

    Use simply the recommandations given in the RTE manual. You don't have to convert to binary : that's something done by the hardware.
    For instance, to send the temperature setpoint to the controler, you have to send a byte string such as
    CA 00 01 F0 02 01 2C DD, where CA 00 01 is a header specific to the type of serial link you are using,
    F0 is the set temperature command,
    02 is the number of bytes expressing the temperature that you are about to send
    01 0C is the temperature in tenths of degree (here : 30°C = 300 tenth = 010C$
    DD is a check sum byte.
    The corresponding labVIEW program is as follow :
    Of course, do not forget to initialize the serial port before writing the string !
    Message Edité par chilly charly le 10-21-2005 06:21 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Water bath.png ‏4 KB
    Water bath.vi ‏28 KB

  • Fluke PM6304 controlled with LabView via RS232

    Hi,
    we're going to control our Fluke RCL Meter with Lab View via RS232.
    Does anyone has experience and show sample code?
    I failed already to make a terminal connection between my PC and the PM6304
    Thanks for comments, maximint.

    Okay, here goes. Once upon a time there was just serial and gpib. Each used completely different hardware,protocols, etc. and there were separate drivers for each. Years ago, a new instrument type was introduced. Based on a VME backplane, these were instruments on a card called VXI (VME with instrument extensions). So, a whole new low level driver was required. The makers of VXI, realizing that the first VXI instruments were the same as their GPIB instruments without a display or power supply, thought that it would be nice if the software that had been developed for the GPIB instruments could also be used for the VXI version. Several vendors, including NI, came up with something called VISA (Virtual Instrument Software Architecture). This was an API that united GPIB and VXI. If you wrote an instrument driver with VISA Writes and VISA Reads, it would work with either type of instrument. The VISA driver itself would determine the actual type of bus and handle all of the low level details. One of the goals of all these vendors was to also make it easy for users to change from GPIB to VXI instruments. While this didn't really happen, the idea of VISA caught on and became very popular and sort of a standard in many places. Eventually, other common forms of instrument busses were added to VISA. Among those are serial, ethernet, usb, pxi. All of the instrument drivers written by NI now use VISA.
    I downloaded the driver for the instrument you need and had a look at it. It really doesn't have much, it's very old, and uses the GPIB functions (not VISA). Since there were so few functions, I went ahead and replaced the GPIB Reads and Writes with VISA Reads and Writes. That will give you a start. You will also need to add some code to initialize the serial port. A great place to look to see how this is done is with an example that has shipped with LabVEIW for years. The HP34401 DMM driver that is on the instrument driver palette is a VISA driver with special support for serial. All of the serial setup is done in the initialize subVI. The type of interface is determined and if serial, baud rate, parity, etc. are setup. Another important setting is a termination character. Serial instruments usually require a CR or LF at the end of each command. You will need to determine what your instrument requires.
    Attachments:
    flpm6304.llb ‏141 KB

  • Communicat​ion via RS232 with a Kollmorgen Servostar 300 using LabView.

    Hello,

    Sorry I am new posting a message here and I post it before I was able to describe my problem.
    I have a Kollmorgen Servostar 300 to control an AKM24F motor and I would like to send the instructions to the controller via RS232 using LabView. I think I had achieved communication from a PC to a Servostar 300 using LabView via the serial port.
    So far I have setup in LabView the configuration of the RS232 (8 bit, no parity, baud rate 38 400), the address of the servostar (ADDR 0), the way the servostar should respond to the host (PROMPT 1) and the error flag (MSG 1), and no error had been detected when I run the program. I should mentioned that after I sent an instruction such as ADDR 0 terminated with a carriage return, I set a delay time of 150 ms, then I read the amount of bytes that are in the buffer, and then I read the buffer, as I mentioned no error message has appear and the ADDR 0 instruction is read from the buffer. Following the same procedure I sent an instruction to move the motor but nothing happens.
    So far I am not sure if the way I am trying to communicate with the servostar is the correct or if I am missing something, any guidance that anyone my give would be greatly appreciated.

  • Can Wireless Home Audio products be controlled via IP with any other devices?

    I'm interested in knowing if the Wireless Home Audio Director, Conductor or Player can be controlled via IP with alternative controllers?  Specifically, I'm interested in integrating the products into a universal remote control or home control system and still have 2 way communications with feedback.  IP and RS232 are the most commons ways of accomplishing this.

    Hi,
    Maybe for basic functions like (play, stop, next) using the IR remote, a third party IR based universal remote may work but that's a big gamble to take, anyway what would be the purpose then of the Linksys DMRW1000 (IP based remote control) remote that Linksys is selling if its compatible with third party remotes.
    Wireless Home Audio remote
    Well that's my thoughts on this, I hope you'll find the device your looking for.

  • Agilent 34401A multimeter to PC with Labview driver via RS232

    Hello!
    I am trying to measure a voltage with Agilent 34401A multimeter connected to PC via RS232 cable. I installed the driver. When I am starting Read Single Measurement.vi. It gives me an error:
    Error-1073807346 occured at Visa Open in Agilent 34401.lvlib: Initialize.vi->Agilent 34401 Read Single Measurement.vi
    Possible reason(s):
    Visa: (Hex 0xbFFF000E) The given session or object reference is invalid. 
    I would like to ask, how can I adjust my system to use RS23 with Agilent 34401A, if it is possible? If not, should I get GPIB card and cable?
    Thank you!
    Yulia.

    LabVIEW already comes with a driver for the 34401 pre-installed, so I'm not sure I understand what you installed. The pre-installed driver is in the Instrument I/O >> Instrument Drivers >> Agilent 34401 functions palette.
    As for the control that Dennis is referring to, it's the VISA control.
    As for the VISA version, you should have received a set of driver CDs along with LabVIEW. That will have the minimum VISA version required. Don't remember off the top of my head which version it is. Probably something like 4.1.
    Attachments:
    visa.png ‏42 KB

  • Can I modify the Arduino sketch 'LIFA_Base​.pde' to include some motor control

    Hi there,
    I am new to Labview and Arduino. I have two Inertial Measurement Unit sensors and I wish to send the readings to a PC via Bluetooth. I read that I can perform this using the LIFA. Can I modify the Arduino sketch ‘LIFA_Base.pde’ to include some motor control? I wish to use the readings earlier to control the motor to move different directions. At the same time, I wish the readings can be sent continuously to the PC wirelessly?

    The newest LIFA_Base.pde has motor controls. The issue that I see is that the VIs are designed to be connected to the Arduino through serial.
    You could have an Arduino connected to the computer and another Arduino connected to the motors. Each Arduino is equipped with Bluetooth to create the wireless connection.
    Alternatively, and probably easier... create your own case in the LabVIEWInterface.pde to handle Bluetooth commands from the computer. In this case, you would only need one Arduino with Bluetooth (connected to the motors). *Assuming your computer has Bluetooth and you can send Bluetooth commands.
    It is hard to give suggestions without knowing the whole system. Hope this helps.
    Edit: Also, you should upload your Arduino (LIFA) related questions to the LIFA Board: https://decibel.ni.com/content/groups/labview-inte​rface-for-arduino
    CLD Certified 2014

  • The sampling rate of Multimeter Protek 508 via RS232

    Hi everyone. I have the multimeter Protek 508. I want to take the data from it via RS232. The default detail of RS232 is:
                    Baud rate: 1200
                    Data bit: 7
                    Stop bit: 2
                    Flow control: None
    I write the code and get the data from it. But i only have the sampling rate is 2 data per second, that mean 500 ms per data. I want the sampling rate more than that. Can anyone help me to solve this problem. 
    Thank you.
    Attachments:
    186148720-Multimeter-Protek-506-pdf.pdf ‏553 KB
    Protek 508 RS232.vi ‏35 KB

    You are probably getting everything out of this device that you can. First, it is old, make that, very old. Back in the day, it might have been quick, but that was then. This is now.
    Second it's a multimeter. Very often meters like that would do running averages to make the reading appear more stable. That averaging slows down the rate at which you get new data.
    How fast are you needing to acquire data?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • DMM MAS345 via RS232 serial comunication

    i have a problem almost like u,and i want to know if there is someone who can help me.I want to send data from a DMM MAS-345 via Rs232(my data settings in labview are baud rate=600,data bits=7,parity=none,stop bits=2,flow control=none,delay before read=10000ms) ,and i don't know why does it showes an error when i try to run the application(error -1073807202).I use like example VISA configure serial port,and i don't know if is wrong!!!I will appreciate if someone can help me.
    Attachments:
    Basic Serial Write and Read.vi ‏34 KB

    Here is some help for you 
    MAS345
    data format: 7n2 at 600 baud (7 bits, no parity, 2 stop bits).
    Control lines:
       DTR and RTS lines are used to power the TX line: RTS is clear
       for -12 supply; DTR is set for +12 supply. Data transmission is
       solicited sending whatever character to the RX line.
    Data string format:
       MAS-345 sends a 14 bytes string with:
             <mode>< ><sign><value>< ><units><return>
       <mode>:  two bytes with the oerating mode: DC, AC, OH, CA, TE ...
       <sign>:  one byte with - or space
       <value>: five bytes with four digits and one decimal dot.
       <units>: four bytes with the units: mV, A, kOhm, nF ...
       <return>: '\r'
       One space is inserted between <mode> and <sign>, one between
       <value> and <units>.
       The data string (without the '\r') is sent to the output device.
    The next question is of course How Can I Control the DTR and RTS Serial Lines in LabVIEW? It is easy take a look here
    http://digital.ni.com/public.nsf/allkb/1ECEFAA7AD52994986256966005356EA
    Good luck
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Function returning control via CType. Is this risk-free?

    I want an easy way to get a TabPage's child (user)control without writing CType() functions everywhere.
    For this I created a function that returns the control via CType:
    Private Function ChildIRCControl() As IRCControl
    Return CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    End Function
    Now, is this risk-free to do or are there any chances that it will bug or don't work in some cases?
    Thanks
    //Visual Vincent
    EDIT:
    Now to rephrase and explain my badly written question:
    The user is able to create new tabs, and for each new tab a IRCControl (which is a UserControl) is added to the tab's controlcollection.
    Now there's no problem doing the above. BUT since the tabs are created programmatically, I cannot get the control inside the tabpage without some kind of cast function.
    Example of creating a new tab:
    Private Sub CreateNewTab()
    Dim IRCc As New IRCControl 'This is a normal UserControl.
    Me.TabControl1.TabPages.Add("New Tab")
    Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls.Add(<a control that has nothing to do with this question>)
    Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls.Add(IRCc)
    End Sub
    Now to access the UserControl in the currently selected tab I need some kind of Cast function. I use CType for this:
    CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    But typing this long CType function in every If statement needed and every Loop used takes time, and is horrible to read.
    Now, will it work just like the normal CType if I access it like this instead?
    Private Function ChildIRCControl() As IRCControl 'The UserControl
    Return CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    End Function
    Private Sub ModifyTextBox() 'Example
    ChildIRCControl().TextBox1.Text = "Hello World!"
    End Sub
    Hope this explanation is better for you guys, and sorry for not bringing all this up before.
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

    Now, is this risk-free to do or are there any chances that it will bug or don't work in some cases?
    To make it safe you would subclass the Tab and TabPage controls and make this method a function of the new Tab.  Then, that class would include code to ensure that only your custom tab pages were added, and that for each added tab page the first
    control was the correct type - presumably creating it automatically or from a value passed to it in the constructor.  That control is then a property of the tab page, and there is no need to use the Controls collection or do any type conversion.
    The problem is that you actually have no control over the order of items added into the Controls array if you are using the designer.   Even if you are sure that each tab page has one of the controls, it might not be at index 1.  
    You could scan the tab page Controls collection, but if there are several of that control type then you also need a way to know which one you really want.  That's what your code should be checking.   If you correctly identify the control in
    the collection there is no need for CType - it's already the correct type.   You can check the type without trying to do the conversion by using TypeOf.  See
    https://msdn.microsoft.com/en-us/library/0ec5kw18.aspx
    Thanks for the answer.
    I guess I could have added this to my initial question too: I'm creating the TabPages and UserControls programmatically and that's why I need to use some kind of Cast function. There are two controls in each tabpage, and they're added in this order:
    Private Sub <Some kind of sub>()
    Dim IRCc As New IRCControl 'The UserControl
    <The new TabPage>.Controls.Add(<The other control>)
    <The new TabPage>.Controls.Add(IRCc)
    End Sub
    So the only thing I wanted to know was if I could do this:
    If ChildIRCControl().TextBox1.Text = "blahablaha"
    ChildIRCControl().RichTextBox1.Text = "blabla"
    End If
    Instead of writing the long CType, or any other cast function all the time,
    If CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl).TextBox1.Text = "blahablaha" Then
    CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl).RichTextBox1.Text = " "blabla"
    End If
    as it's both a readability and writability nightmare.
    And at last I apologize for the badly explaining question that I wrote.
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

  • DAQ and motor control in the same VI

    Hello,
    I am a beginner in labview and I am trying to control a maxon motor and run a NIDAQ at the same time. Basically, I need to measure the pressures and the angles at the same time and record these.
    The problem that I am facing is that when I execute the VI, the motor runs first and this is followed by the measurement. I have twiddled around with it a lot getting a lot of help from this community but I can't figure it out. No matter what I do the motor starts running first and after the motor has completed its movement then the DAQ takes the measurements.
    Is there any way to run the motor and the sensors together? I can run the motor seperately and I can run the sensors separately in their own VIs but can't seem to run them sequentially.
    Any help would be appreciated.
    Aman
    Attachments:
    VI.jpg ‏64 KB

    In LabVIEW, your wires between VIs (and structures like While Loops) determine the order in which things happen.
    There are several approaches that you can take to de-couple the motor and DAQ processes.  The most obvious would be to put the motor control in one while loop, and the DAQ in another.  Yes, you can do this in LabVIEW.  Just don't get too carried away.  Each loop usually will go to a separate core to run.
    If there is data that has to be shared between the loops, you can use local variables, or the Value property nodes of the controls and indicators of your VI.
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • How to create user credit control via customization

    Hi !
    I have to create user credit control via Transaction :
    SPRO.
    path:
    Sales and Distribution->Basic Functions->Credit Management/Risk Management->Credit Management->Define Automatic Credit Control.
    I want to check the user checkbox, and create my logic
    of credit control.
    In the help of credit control screen, it says that i have
    to use user exits LVKMPTZZ and LVKMPFZ1.
    However when i looked for that user exits at SMOD
    that user exit don't exist !!!
    How do i use those user exits ? Why can't i find those user exit ?
    Can you give me please  a code example of how to use
    the user checkbox to change the logic of credit control ? or any material about the issue.
    thanks
    moshe

    Hi,
      You dont find the programs LVKMPTZZ and LVKMPFZ1 in SMOD transaction, check in SE38 by typing the program names, there you have the provision to write your custom code,
      As user exits are specific to the business, it would be difficult to send the sample code to cater the functionality expected by your business,
    Hope this helps,
    Rgds,

  • Maxon Motor Control and NI UMI7774

    Hello,
    I am using maxon motor control PWM servoamplifier ADS 50/10 for my application.I am currently working on a project that requires me to get the precise position (mesure) with an incremental encoder with 2 channels A and B. I am Using NI Motion, NI UMI-7774,NI PCI 7550, and Labview 10
    I try to connect my maxon direct with the Labview Hardware NI UMI 7774 and i don t know how to do this.
    anyone have any idea?

    Hello,
    can you please give me some more informations about the problems you see with the connection?
    Generally you have to at least connect the "Analog Output", the "Ground" and the "Enable" from the NI-7350 with the Maxon ADS 50/10.
    You can find an overview about the pins of the NI UMI-7774 here on page 16/17:
    http://www.ni.com/pdf/manuals/373359c.pdf
    The connector for the Maxon you can find here:
    http://www.farnell.com/datasheets/6244.pdf
    Please tell me, what informations you are looking for.
    Johannes

Maybe you are looking for

  • Report KSB1 take time to give output

    Hi When we run the T-Code KSB1 for a report it is taking more than 1 Hour to proceed the report for one month time period. This happening only for certain  group of cost centers only. Can somebody help to solve this issue. Regards Kesharika

  • How do I create a PDF from My scanner?

    The only way Adobe X and XI allow PDF creation is online.  IX allowed multiple options for creating a PDF including from the scanner.  Why has it changed, and how do I create a PDF from the scanner?  If It can't be done on the newer versions, how do

  • Adcfgclone failing with RC-00110: Fatal: Error occurred while relinking of

    Log file located at /u01/oracle/VIS/db/tech_st/11.1.0/appsutil/log/VIS_infsgvm09/ApplyDBTier_12240910.log - 0% completed RC-00110: Fatal: Error occurred while relinking of ApplyDBTechStack ERROR while running Apply... Mon Dec 24 09:13:43 2012 ERROR:

  • 401 Unauthorized - SharePoint IP

    Hi guys, I am trying to work with SharePoint IP for SCO but couldn't get it working. I am working with the Monitor List Item. I even install the SharePoint foundation server on the SCO server to test the permissions but still getting the same followi

  • Authroware slow to start on web/lms

    Our Authorware template has all frames (rich media) hanging from the framework icon. Does the web player have to load all of the frames in the framework to start the first frame? This seems to be such a poor design for web playback, but when we publi