LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect PC to a Clima Temperatur system

Solved!
Go to solution

Dear All,,

I'm trying connect PC to CTS Chamber through  RS232  using serial communication. I need to control Temp using Labview the problem is refer to the PDF attach section E.2.3 i need to send a string to set the temp to -14.5 I build the VI but the string still not correct ,Can somebody told me how can I replace Element inside array. I'll attach the labview file to know what going on.I need replace ''AC'' to ''AE'' According to the PDF file attached.

 

the Check sum also it doesn't correct refer to the PDF File the CHK is C3 and in my labview program is C1. 

 

Please your help is appreciated 

Download All
0 Kudos
Message 1 of 14
(3,903 Views)

Hi,

 

    Below is the logic. 

Simple_Ex.png

 

 

0 Kudos
Message 2 of 14
(3,864 Views)

Thank you Heart

0 Kudos
Message 3 of 14
(3,857 Views)
Solution
Accepted by topic author SAED123

@SAED123 wrote:

Dear All,,

I'm trying connect PC to CTS Chamber through  RS232  using serial communication. I need to control Temp using Labview the problem is refer to the PDF attach section E.2.3 i need to send a string to set the temp to -14.5 I build the VI but the string still not correct ,Can somebody told me how can I replace Element inside array. I'll attach the labview file to know what going on.I need replace ''AC'' to ''AE'' According to the PDF file attached.

 

the Check sum also it doesn't correct refer to the PDF File the CHK is C3 and in my labview program is C1

 

Please your help is appreciated 


Is this due to the localization code of your decimal separator being a comma? You can change the default localization code by using %.; for period. Lots easier than using a Search 1d Array function afterwards. BTW, any method that you use to change the decimal separator has to be done before you generate the CHK. So jay0909's method of simply replacing the value would have a wrong CHK value.

 

Your CHK algorithm is wrong. You are using a "Not Exclusive Or". Should be an "Exclusive Or". You also don't need the case structure. Just initialize the shift register to ZERO. Those local variables are also not necessary. You can get rid of them. Here is a simplified version of what it should look like.

 

CTS Control Temp (MO).png

 

0 Kudos
Message 4 of 14
(3,836 Views)

Dear jamiva

 

Yes, the problem was with coma, your simplification are useful and I can now Control the TEMP.

 

Tanks a lot 🙂  

0 Kudos
Message 5 of 14
(3,822 Views)

Dear jamiva

 

Can you till me how can I remove the ''B0'' in the string I don't need in the final string see photo attached  

Download All
0 Kudos
Message 6 of 14
(3,812 Views)

Hi,

 

          Its just a simple string operation. Just use string replace. Read the String basics in Labview.

0 Kudos
Message 7 of 14
(3,807 Views)

@SAED123 wrote:

 

Can you till me how can I remove the ''B0'' in the string I don't need in the final string see photo attached  


I'm not sure what you are trying to do. I never used this device, but from what I get reading the protocol, you are going about it all wrong.

 

The string you are trying to create is actually the RESPONSE back from the CPU. In order to read the analog parameters, you need to instead send the "PCU to CPU" command. Afterwards you would read the response and parse it IAW "CPU to PC".

 

Protocol.JPG

 

Here is the syntax to create the PC to CPU Command

Read PCtoCPU.png

0 Kudos
Message 8 of 14
(3,799 Views)

Thank you dear but I need to read parameter from CPU to PC I generate the string see attach Labview but According to the Protocol in PDF  sec.E.2.4 CPU to PC see attach photo.

 

 

Download All
0 Kudos
Message 9 of 14
(3,794 Views)

@SAED123 wrote:

Thank you dear but I need to read parameter from CPU to PC I generate the string see attach Labview but According to the Protocol in PDF  sec.E.2.4 CPU to PC see attach photo.

 

 


You want to READ the parameters from the CPU. Correct?

 

How do you do that? You need to tell the CPU to send the data to you.

How do you do that? You send the PC to CPU command requesting to data (as I showed you above). It will then send you the data in the format according to CPU to PC protocol.

 

0 Kudos
Message 10 of 14
(3,777 Views)