LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC: debugging I/O server

I need to debug a periodic I/O server AFTER it has been deployed.  Does anyone know of a way to do this?  Using LV DSC 8.5.

Thanks,

--David Moerman
0 Kudos
Message 1 of 7
(3,245 Views)
Hi David,

The only way to debug it is before it's deployed.
Please do that in the LabVIEW developer environment first.

The feature to debug after deployed is currently not availible.

This would be a great products suggestion.
Please file a product suggestion here
We really appreciate customer feedback and suggestions

Thank you
Van L
NI Applications Engineer
0 Kudos
Message 2 of 7
(3,223 Views)
I would like to explain why it is difficult to debug my I/O server in the normal development environment.

Firstly, the periodic I/O server I developed publishes data via it's front panel controls which are then bound to shared variables when deployed.  The issue that I'm trying to debug involves another "client" application which reads and writes data to those SV's, which the I/O server then acts upon.  I thought of a potential way to get around this: using front panel data binding for each control in the development mode (i.e. where the triangle LED is visible/active).  I tried this, and it "almost" worked.  Unfortunately, it exposed my second problem:

The second issue has to do with how SV scaling is implemented.  If I read/write using front panel data binding, or using datasocket read/write (or probably block diagram SV nodes, although I didn't verify this yet), the SV scaling is BYPASSED.  Therefore, if you write a "1" to a Double, you will read back a "1" even if a scaling factor exists.  This is NOT how the deployed I/O server works:  when I write a value to a front panel indicator in the I/O server, it is scaled when I read it back with my client program.  This is important functionality that I utilize.  If there was a way to somehow "get in front" of the scaling function when writing to a SV with datasocket, I could work with it.

Anyway, I will submit the debugging ability as a product suggestion.

--David Moerman
0 Kudos
Message 3 of 7
(3,214 Views)
I apologize for the inconvenience.

and thank you David for taking the time to fill out the product suggestion.

R&D will take a look at your detailed request and assess the possibility to implement it in upcoming versions

Thank you again



Van L
NI Applications Engineer
0 Kudos
Message 4 of 7
(3,201 Views)
Hi David,
 
Thank you for bringing forward this good product suggestion.
 
"Debugging custom I/O server" could be a cool feature in DSC module. However, I don't think this feature will be implemented in the foreseeable future. Currently, custom I/O servers are hosted in the NI Variable Engine, which is a Windows Service and can not have any GUI attached to. If we decide to support the "Debugging custom I/O server" feature, that means a big change in our architecture. So I would rather suggest you use some workaround.
 
For your second issue with SV scaling,  I have some difficulty understanding your question. Do you mean you want to write some value to a SV that is configured with scaling and read the scaled value back? There is a subtle point to be made here: The scaling is supposed to take effect on the "source" value of the SV. That is, if this SV is bound to some I/O server item, and you write some value to this I/O server item, you will get the scaled value when you read the SV. If you write a value directly to the SV, then the SV value itself will NOT be scaled. Instead, the "source" I/O server item will be inversely scaled.  In other words, the SV only scales values that comes from the "source" item. 
 
Please correct me if I misunderstood your question. If you have some test programs, that will also be helpful for us to investigate your issue.
 
Yan Yuan
NI Software Engineer
0 Kudos
Message 5 of 7
(3,142 Views)
Thanks for your response.  That is too bad that debugging the deployed I/O server will not be possible.

Therefore let's discuss the workaround.  If I could run the I/O server in the development environment and have it behave just like the deployed I/O server, my debugging problem would vanish.  But currently I can't find a convenient way to do this, because when the I/O server publishes data to the SV it gets put through the scaling function.  You are quite clear in your description of how the scaling works, and certainly what you describe is the functionality that I experienced.  So in order to test the I/O server, it seems I have to explicitly publish data to the SVs, and I have to perform the scaling within the I/O server, and then find a way to shut off this scaling when it gets deployed.  Quite a kludge, but maybe you can think of a better way.

FYI, here is what I'm trying to do.  I created the I/O server as a "device simulation" server that represents an industrial process I'm trying to control.  My client application does the control, and the I/O server simulates the response.  When I go to the factory floor, I want to plug in the real device(s) such that my client application doesn't know the difference.  The real device supplies integer values for the analog I/O points (via Modbus), which must be scaled to real-world numbers.  That's what I'm getting my "simulation server" to do: supply integer values just like the real device.

I'm not comfortable posting my code to this forum but I could send it to you directly.


--David Moerman
0 Kudos
Message 6 of 7
(3,127 Views)
So, I think the problem is, you want to debug the I/O server template VI as a regular VI and don't want make any change when it gets deployed.  A possible workaround is creating some SVs as "relays". You can bind your front panel controls/indicators with these "relay" SVs, and make them as the "source" of the SVs which have the scaling configuration. The scaling would then work properly.
 
I'm not sure if this is a good enough solution for you. So please feel free to put your comments here, or send something to me via yan.yuan@ni.com.
 
 
Yan Yuan
NI Software Engineer
0 Kudos
Message 7 of 7
(3,105 Views)