ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
@Ezzow wrote:
do you have a better way to program it than the one I mentioned ?
my problem is: the mass should actually be increasing at that point where it's the same ..
I get that but if the data your are receiving from your scale says it is not increasing, what would you propose to do?
this is what I did: if the derivative of the measured mass [g/s] = 0 (means when the mass [g] is constant), then use the last mass value for the next calculations and not the actual one.
it works. However, it's not very clean. It seems like there's no way to make it completely clean. Because the scale isn't compatible for this kind of data logging I guess.
Hi Ezzow,
@Ezzow wrote:
this is what I did: if the derivative of the measured mass [g/s] = 0 (means when the mass [g] is constant), then use the last mass value for the next calculations and not the actual one.
When the derivative is zero then the "actual value" is the same as the (previous) "last one"!
What's the difference between using the "last value" instead of the "actual one" in that case???
I'm using the last value of the derivative.
if the derivative = 0, then use the previous value of the derivative.
Because all I need for the next calculation is the derivative value..
I agree with RTSLVU, you're spinning the while loop too fast and no data is coming through and you're interpreting it as missing data so you use the last recorded reading.
Let's back up here.
How is the scale setup independently of the computer and the CRIO? Is it waiting for a "get me the next reading" via a send commend message or is the scale set up to continuously send data after some delay? I'm no expert on weight scales (I assume that is what you are using), but the ones I've ran into, there is a setting that will let you do this and it looks like the latter is what you're doing.
Let us know how the data acquisition part is first, THEN we can explore solutions.
The scale is sending data continuously with the following setting:
Baud rate: 19600
stop bit: 1
start bit: 1
parity: none
this is the configuration in the attached datasheet:
datasheet:
do/did you use the same settings before?
A couple things...
Then rewrite your program to query the scale at regular intervals that are far enough apart in time as to not get the same measurement twice
Since I don't know what that is then apparentely it didn't happen.
I set the rE Cr configuration and now I get the following error with the same program attached in the first post:
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Hi Ezzow,
@Ezzow wrote:
I set the rE Cr configuration and now I get the following error with the same program attached in the first post:
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Did you read the last message?
It says:
After the balance having received the s/w/t commands, it will send the following data.
Did you send any s/w/t command before getting the TimeOut error?
Hi GerdW,
thank you for the feedback!
I'm not sure how to do that through LabVIEW. Is there any references you can suggest ?
best regards
Ezzow