LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help by TCP/IP issue with Error 1 in Labview Code

Solved!
Go to solution

Hello,

In the meantime, I have set up something else with the different drivers. The drivers were already there (temperature control and setpoint temperature).
The aim here is:
- Switch the thermostat on or off
- Set the target temperature
- Call up the internal temperature

I always get this error message:
Invalid input parameter. For example, if a path is present at the input, this path may contain characters such as ? or @, which are not permitted in the operating system.
=========================
This command can only be used if the GPIB controller is the active controller.


Enclosed I am sending you the programme. I would be very grateful if you could help me. Many thanks in advance.

 

Thermostat_Frontpanel.PNGThermostat1.PNG


 

0 Kudos
Message 1 of 16
(1,730 Views)

A picture of a VI, which cannot be clearly seen (very tiny), cannot be tested, and is "incomplete" (the Error is clearly being generated by one of the two sub-VIs you show in your picture) doesn't provide me with enough information to do other than "guess".

 

To get better help, please attach the following:

  1. The VI "Thermo_oberer.vi".
  2. The first sub-VI shown on the Error Line.
  3. The second sub-VI shown on the Error Line.
  4. Some information about the Device you are trying to control.

Here's something you should try:

  1. Plug in your Device.  It looks like it is configured to communicate with you over WiFi.
  2. Test to be sure it is connect.  You should be able to do this by "Pinging" the device.
    1. To do a Ping, open a Command Prompt (type "cmd" in the Search box).
    2. Type "ping 192.168.0.30".  See if you get a response, or if it times out.  If the latter, there's your problem.
  3. Assuning the device is connected, open MAX and find the Device under Devices and Interfaces.  If you don't see it, you may be missing the Driver.
  4. If you do see it, open a Test Panel and try to send the Device some commands (refer to the Documentation that comes with the Device).

If the above tests are successful (or you find a sequence that makes them successful), rewrite your LabVIEW code to do the same thing.

 

Bob Schor

Message 2 of 16
(1,706 Views)

As any other experienced user might point out - NO, images are NOT SUFFICIENT TO DEBUG

 

Attach you source code and all other related files, manuals of the device you try to control - in order for us to help you

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 16
(1,706 Views)

Hello,

 

Thank you for your answer. Attached you will get the source code and all other related files, manuals for the device I am trying to control.

 

I really appreciate for your help.

0 Kudos
Message 4 of 16
(1,657 Views)

Hello,

 

Thank you for your answer. Attached you will get the source code and all other related files, manuals for the device I am trying to control.

 

- Thermo_oberer.vi

- first Sub.vi: Thermostat- Temperierung.vi

- second Sub.vi: Thermostat- Sollwert Temperaturregler.vi

Documentation that comes with the Device

 

I really appreciate for your help.

0 Kudos
Message 5 of 16
(1,653 Views)

The Manual (which, fortunately for me, was in English) was the most helpful.  Your device essentially uses VISA to establish a Serial Protocol for communication, where you send an 8-character string terminated with <CR><LF> (the usual Windows character pair when you hit <Enter> and if VISA has been set up (as it is by default) to "Use <LF> as a Termination Character", communication using simple VISA commands should be (hmm, how do you say "a piece of cake" in German?) simple, as well.

 

You didn't attach the "Thermostat - Communication" VI that the Huber provided, but it probably helps you by formatting the Commands for you.

 

My advice would be to connect your device to your PC, open MAX, and try to find the device.  I'm not sure how you plug it in -- a USB port, a Serial (RS-232) cable, a GPIB connector, Ethernet, perhaps, but look at Devices and Interfaces and see if you see something that looks appropriate.  It might even say "VISA" somewhere.

 

If you find such a thing, you should be able to open a VISA Connection to it (look on the right-hand pane in MAX when you've selected the device for something that looks like "Test Panel" or something similar).  When you set up VISA, see if you can find the setting to Use <LF> as a Terminator.

 

Try the simple command shown as Example 1 on page 28 of the manual, Setpoint to be set to 20°C -- send the string "[M0007D0<CR><LF>" (which you type as the 8 characters "[M0007D0" and then press the <Enter> key which sends the two characters <CR><LF>).  If everything works, the device should respond "[S0007D0<CR><LF>" (I'm not sure how it will handle the last two characters, but the first 8 should be there).  Note that the temperature of 20°C is expressed in "centi-degrees", that is, by a value 100 times larger (20*100=2000) so fractional values can be represented as an integer.  In addition, numeric values in Commands and Responses are in Hexadecimal, so you need to convert 2000 (decimal) into 07D0 (be sure to remember you need 4 digits, hence the leading "0").

 

I suspect the sub-VIs that Huber provides handle a lot of the "busywork" for you, formatting the Commands and converting numeric values into Hex strings.  If they send you their routines in a form that you can open in LabVIEW, you should be able to "see for yourself".

 

Try doing what I suggested here, and see if that gets you started.  Please let us know how it went.

 

Bob Schor

Message 6 of 16
(1,649 Views)

Hello,

I thank you for your help and i am very grateful for it. First I just tried to do a ping of my device and got the following:

Ping is executed for 192.168.0.30 with 32 bytes of data:
Request timeout.
Timeout of the request.
Request timeout.
Request timeout.

Ping statistics for 192.168.0.30:
Packets: Sent = 4, Received = 0, Lost = 4

 

To find the device I opened MAX and got this error message (attached picture): The device is not accessible means (Das Gerät ist nicht erreichbar)

gabrielstephane12_0-1630923666428.png

 

 

like i said before the two thermostats are now enclosed on a router whose name is NETGEAR FS108 (Fast Ethernet Switch) . The Computer is connected to the switch via a network cable and the computer i am using is on the same network with an IP adress as the switch.

Note: The IP adress of the router NETGEAR FS108 is 192.168.100.100

 

gabrielstephane12_1-1630924542137.png

In the attachment I send you the VI "Thermostat - Communication" von Huber
If I take the VI "Thermostat - Communication" from Huber and run it with the corresponding communication from the thermostat, I always get no response. I need your help please.

 

Thank you for your answer.

 

 

 

 

 

 

0 Kudos
Message 7 of 16
(1,610 Views)

@gabrielstephane12 wrote:

Hello,

I thank you for your help and i am very grateful for it. First I just tried to do a ping of my device and got the following:

Ping is executed for 192.168.0.30 with 32 bytes of data:
Request timeout.
Timeout of the request.
Request timeout.
Request timeout.

Ping statistics for 192.168.0.30:
Packets: Sent = 4, Received = 0, Lost = 4

 

To find the device I opened MAX and got this error message (attached picture): The device is not accessible means (Das Gerät ist nicht erreichbar)

gabrielstephane12_0-1630923666428.png

 

 

like i said before the two thermostats are now enclosed on a router whose name is NETGEAR FS108 (Fast Ethernet Switch) . The Computer is connected to the switch via a network cable and the computer i am using is on the same network with an IP adress as the switch.

Note: The IP adress of the router NETGEAR FS108 is 192.168.100.100

 

gabrielstephane12_1-1630924542137.png

In the attachment I send you the VI "Thermostat - Communication" von Huber
If I take the VI "Thermostat - Communication" from Huber and run it with the corresponding communication from the thermostat, I always get no response. I need your help please.

 

Thank you for your answer.

 

 

 

 

 

 


That's not your router; that's you.  I don't think you can see your device from that address.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 8 of 16
(1,598 Views)

If your thermostat actually is configured with the IP Address (192.168.0.30) you included in your original post and your PC is 192.168.100.100, you will not be able to communicate with it since they are on different subnets and the packet would be sent to your default gateway which has no knowledge of your thermostat.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 16
(1,552 Views)

Hello Mark,

 

First of all, thank you for the answer you sent me regarding the IP-address. This allowed me to finish my assignment.

 

I have been trying to find a way to control the scale, but I keep getting the following error codes: 1073676294 and -1073807252. I am having trouble getting through. I don't know what to do.

 

I have to tare the scale and then read the actual weight of the scale. For this purpose there are already the appropriate commands and drivers.

 

As attachment I send you everything I have done and you can see and tell me where the fault lies.
I really need your help to be able to continue.

 

thank you again

Gabriel

 

 

0 Kudos
Message 10 of 16
(1,527 Views)