ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

Data logging through RS232 stops


@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? 

========================
=== Engineer Ambiguously ===
========================
0 项奖励
11 条消息(共 23 条)
1,220 次查看

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. 

0 项奖励
12 条消息(共 23 条)
1,211 次查看

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???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
13 条消息(共 23 条)
1,183 次查看

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.. 

 

0 项奖励
14 条消息(共 23 条)
1,175 次查看

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.

0 项奖励
15 条消息(共 23 条)
1,155 次查看

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: 

Ezzow_0-1666646622349.png

 

datasheet:

https://merlegcenteratmeneti.shoprenter.hu/custom/merlegcenteratmeneti/image/data/PCB-BA-def-1718.pd...

 

do/did you use the same settings before?

0 项奖励
16 条消息(共 23 条)
1,156 次查看

A couple things...

  1. Have you set the linearization and calibration?
  2. Instead of using the "Continuous data output mode"
    1. AU PC:
      The weighing values are sent automatically and continuously, no matter if the value
      is stable or unstable.
  3. Use the "Data output via remote control commands" mode
    1. rE Cr:
      The remote control commands s/w/t are sent from the remote control unit to the
      balance as ASCII code. After the balance having received the s/w/t commands, it will
      send the following data.
      Take into account that the following remote control commands must be sent
      without a subsequent CR LF.
      s Function: Stable weighing value for the weight is sent via the RS232
      interface
      w Function: Weighing value for the weight (stable or unstable) is sent
      via the RS232 interface
      t Function: No data are sent, the balance carries out the tare function.

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

========================
=== Engineer Ambiguously ===
========================
0 项奖励
17 条消息(共 23 条)
1,133 次查看

 

  1. Have you set the linearization and calibration?

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.

 

 

0 项奖励
18 条消息(共 23 条)
1,118 次查看

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
19 条消息(共 23 条)
1,116 次查看

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

0 项奖励
20 条消息(共 23 条)
1,100 次查看