LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6Dマーカーからデータを受け取ったときのタイムスタンプを取得したい。

Solved!
Go to solution

こんにちは。てちです。

現在私は、6Dマーカーというものからデータを受け取ったときの検出時間をLabViewにて取得しようと試みております。

説明書によるとDatetime.toBinaryにてバイナリ化されてint64で出力すると書かれてましたが、LabViewの方で取得すると文字化けで困ってます。

また、普通に受け取って16進数文字列にて表示すると16進数で値が見れるのですが、順番がぐちゃぐちゃなのかそのまま戻しても果てしなく大きな値になってしまいます。

知見のある方解決方法をご教授ください。

詳細は添付をご覧ください。

0 Kudos
Message 1 of 8
(1,830 Views)

The block diagram picture shows the front panel.

0 Kudos
Message 2 of 8
(1,801 Views)

MaSta 様

コメントありがとうございます。

ブロックダイアグラムの写真添付しなおしてみました。

もし解決策わかりそうでしたら教えていただきたいです。

ブロックダイアグラム.png

0 Kudos
Message 3 of 8
(1,774 Views)

Your code makes no sense. Converting a string to an U8 array then to I64 and back to a string is pointless. All you get are coercions and hot air.

 

Once you attach a simplified version of your VI containing a diagram constant of a typical string (create an indicator on the received raw string. Run your VI until the raw string contains data. Right-click the indicator and create constant.) we can probably help you.

 

Maybe all you need is to unflatten the string to an I64 array with two elements. Do you know the byte order?

 

Do you have a copy of the manual? 

0 Kudos
Message 4 of 8
(1,768 Views)

Altenbach さん

ありがとう!!

私はLabView触り始めて1年です。バイトオーダーというものを知りません。

私が簡易的に作ったテストVIを添付するのでもしよかったら直してみてほしいです。

 

マニュアルも持ってないです。

0 Kudos
Message 5 of 8
(1,759 Views)

We don't need the project file, just the VI.

 

The Vi does not have any usable default data. All indicators are blank.

 

Sorry, I don't quite understand your front panel image, but aren't you supposed to read 152 bytes and interpret all fields as described? )e.g. X, Y, Z as 8 bytes and cast to DBL)?

 

altenbach_0-1706862626641.png

 

 

 

0 Kudos
Message 6 of 8
(1,731 Views)

VI上127.0.0.1への通信をしています。

テスト環境でもデータを通信で受け取っている為データを取り出すことができません。

 

 

フロントパネルの画像についてですが、赤色になっている”検出時間”(8bite)のみを取得し、文字化けさせずにdatetime型に変換したい

です。パケットの中身を参考までに書いているだけなのであまり深く気になさらないでください。

 

・文字化けをさせないor文字化けを直すことで解決しますので、もしdatetime.toBinaryでint64に変換されたデータを文字化けなく直す方法をご存じでしたら教えていただきたいです。

 

0 Kudos
Message 7 of 8
(1,694 Views)
Solution
Accepted by topic author Teeeeech

You simply need to know how the data is encoded (datatype, byte order, etc.) and then unflatten the string accordingly. Obviously we don't have sufficient information to do that.

Message 8 of 8
(1,687 Views)