LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data transmission from Simple Message Library to database

Solved!
Go to solution

 

Hello everyone,

Currently, we use NI 9683 as the micro controller to control the battery inverter and data transmission. The labview program run in this NI board uses the library of Simple Messaging (STM) to transfer data and control command via TCP/IP. How can we transmit data from labview to mySQL database?

 

I tried to follow the STM packet format to send the data, but it didn't work. Then I tried to receive data, the data can be received but it was unrecognized symbols. Capture.PNG

Maybe someone can give me some suggestions.

Many thanks for reading!

 

0 Kudos
Message 1 of 6
(2,984 Views)

Show the code here - without it it's difficult to tell something. To communicate with SQL database, I guess that you need to use Database Connectivity Toolkit - b/c STM just transfers data, and you need to communicate with database; it's two completely different stories...

 

Sincerely, kosist90

 

logos_middle.jpg

 

Check out new features and changes in LabVIEW 2017!

0 Kudos
Message 2 of 6
(2,946 Views)

0 Kudos
Message 3 of 6
(2,937 Views)

Here's the code. I'm sorry I didn't make myself clear...

One of the purposes of this code is that when the "soc" command is received from the host, soc value ("Battery Low SOC") will be written to the host. My question is that how I can send command "soc" and receive the value using other applications (besides labview) via TCP/IP?

 

Capture1.PNG

0 Kudos
Message 4 of 6
(2,932 Views)

I only owe there is an example floating around somewhere for using STM with C++.  It is a simple protocol.  Just examine the code and it will be obvious.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(2,904 Views)
Solution
Accepted by topic author Yuni233

Thank you all for the help!

Here's the link for Microsoft Visual C++ Client Reference Example for Simple Messaging (STM) fore reference.

https://forums.ni.com/t5/Reference-Design-Content/Microsoft-Visual-C-Client-Reference-Example-for-Si...

0 Kudos
Message 6 of 6
(2,871 Views)