04-10-2012 09:57 AM
i am reading loadcell values from DAQ and also controlling motor(SMC 100-i have labview drivers) in the same program. I am using TDMS to record the "Motor Position", "Time" and "Load Value"
There is one problem which is : the sample time of the DAQ and the Motor controller are different. When i open the excel file: recorded number of samples of the "DAQ time" and "loadcell value" is 9401 , while the number of samples of the motor position is only 95 . How can i take the same number of samples from both the loadcell and the motor controller?
I have attached the screenshot&written program.
Thank you for reading and answering.
Best regards from Turkey.
04-10-2012 12:50 PM
Does the SMC-100 allow you to do buffered acquisitions or can you only read a single sample every loop? If software timing and single samples, like you are currently doing, is the only option for the SMC-100, then the only way to have the number of samples from the SMC-100 match the DAQ card is to also do software timing on the DAQ card. Not really the ideal solution I know, but unless you can do buffered acquisitions with the SMC-100 that may be what you have to work with.
04-15-2012 07:40 AM
I changed the DAQmx rate from "1000" to "4" which means that i can take only 4 samples per second. and now the motor position's number of samples are equal to the Loadcell values after the test completed. But 4 samples per sec. is very less for my Test set-up. how can i understand that SMC-100(motor controller) allow me to do buffered acquisitions? While i was researching how to get more datas from the motor controller, i thought that maybe i can make it possible using VISA codes? (For example using "VISA Set input/output buffer size" after the port initialization) Is it possible? Am i on the right track? Is there any detailed tutorial about visa?
04-15-2012 09:31 AM
04-15-2012 01:18 PM
How may i increase the baudrate then? I have SMC100 labview drivers but I could not see any vi which refers to increasing the baudrate.
Greetings from Turkey.
04-15-2012 03:37 PM
04-17-2012 07:35 AM
57600 bauds rate is set for SMC 100 in labview , i also checked this value from SMC 100 manual, it is also 57600. But i can only read 4 samples per second. This is very limited, very less value. I dont know why, pls help me
Greetings from Turkey.
04-17-2012 12:25 PM
If that is the max that the smc sends then that is the max and you can't do anything to change it. What exactly does the spec from smc say? If it says something greater is possible, then you can address why you cannot acquire any faster.
04-17-2012 12:32 PM
I agree with Dennis, you should contact Newport.
I browsed their site and found "The typical execution time for a tell position command, for instance, is only in the range of 10 to ....", but this was when using 485. It looks like they have done some benchmarking so ask what the max is for RS-232.
If it is under 250ms then we should back up and look at the code again. Have you done any test with just the SMC100 driver VIs (no DAQmx)? Is the DAQmx read blocking until it gets its 4 samples?
Hope this helps,
04-18-2012 01:02 AM
First of all: thanks alot for your consideration.
One thing that I suspect is : i am writing the motor position to the TDMS file and in order to connect the "tell current position" to "TDMS Write" i am initializing an array, (turning element wire to the 1-D array) "tell motor positon.vi" gives element type of wire.
Is it possible that some of the datas are getting lost while forming 1-D array. Because i understand from tdms that i have got 4 samples per sec. from motor position.