Write empty value through PCO
Hi,
I have a tag on my OPC server with datatype String.
When I write an empty value to the tag through PCo I always get the error: "Invalid tag value for x".
Writing a space works but this is not good because the PLC will interpret this differently.
How can I write an empty value to a tag?
I am using Kepware OPC and PCO 15.0.0.1959
Thanks
If i comment out.write(value) it prints fine to file. below it saves "test" at every columns.
So that narrow it to this line "String value = (String)custTable.getValueAt(j, k);"
for (int j = 0; j < rows; j++){
for (int k = 0; k < columns; k++){
String value = (String)custTable.getValueAt(j, k);
// out.write(value);
out.write("test");
out.newLine();
out.close();getValueAt dont return any data at all when it meet an empty column?
Similar Messages
-
Passing null/empty values from a actionscript VO to a Coldfusion ORM object
This is the situation.
If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
For instance, if you have the following actionscript VO:
package vo
[RemoteClass(alias="com.companyname.Person")]
[Bindable]
public class Person
public var person_id:Number;
public var last_name:String;
public var first_name:String;
public var email:String;
public var created_date:date;
public function Person() {}
And you have the corresponding Coldfusion component:
<cfcomponent displayname="person" output="false"
alias="com.companyname.Person"
schema="dbo" persistent="true"
table="PERSON">
<cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
<cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
<cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
<cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
<cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
</cfcomponent>
Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created. This is bad, bad, bad. Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails. But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not. If you pass an empty string ("") you still have the same problem. I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
There seems to be two ways around it. One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine. I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
Have other people encountered this problem? How have you gotten around it? Thanks.I realize that I didn't clarify that I am using ColdFusion
for getting the data. This class was generated by the Create CFC
wizard in Flex Builder.
package com.generated
[Managed]
[RemoteClass(alias="components.generated.clients.Clients")]
public class Clients
public var clientid:Number = 0;
public var clientfirstname:String = "";
public var clientlastname:String = "";
public var clientaddress1:String = "";
public var clientaddress2:String = "";
public var clientcity:String = "";
public var clientstate:String = "";
public var clientzip:String = "";
public var clientphone:String = "";
public var clientemail:String = "";
public function Clients()
} -
Passing null/empty values from Flex to a Coldfusion ORM object
This is the situation.
If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
For instance, if you have the following actionscript VO:
package vo
[RemoteClass(alias="com.companyname.Person")]
[Bindable]
public class Person
public var person_id:Number;
public var last_name:String;
public var first_name:String;
public var email:String;
public var created_date:date;
public function Person() {}
And you have the corresponding Coldfusion component:
<cfcomponent displayname="person" output="false"
alias="com.companyname.Person"
schema="dbo" persistent="true"
table="PERSON">
<cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
<cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
<cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
<cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
<cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
</cfcomponent>
Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created. This is bad, bad, bad. Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails. But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not. If you pass an empty string ("") you still have the same problem. I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
There seems to be two ways around it. One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine. I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
Have other people encountered this problem? How have you gotten around it? Thanks.Looks like a known workaround to this issue is to wrap the Flex object in an array.
The ColdFusion CFC will accept that as an array, with the first an only element being a struct, which is the object you built in Flex. -
Hi,
I use LabVIEW 6.1 for some speed measurements. Sometimes it happens that my software was not able to calculate a speed or it finds the found value not worth mentioning, and that is OK.
And after the measurements I write the results to Excel in a 2D array using DDE. But when there is no speed recorded Labview fills up the empty spaces with zero values. But I don't want that because it will affect my statistics like the mean.
Is there a way to write NULL (empty) values to excel instead of the 0?
Thanx in advance.
Illustration:
(x) (y) VALUE
1 2 23.5
2 3 45.78
3 4 <----- Here I don't want LabVIEW to put a zero (0) but an empty space.
4 5 12.23Excel does not support the concept of NaN so if you do not want to convert to string first, insert NaN yourself into your 2D array and modify the cell update to check for NaN and do not set the cell value if NaN
Stu McFarlane
Viewpoint Systems, Inc. -
Write OPC Values Delayed or Conflicting?
We have Lookout 6.1 and KepWare OPC server. We have values from a fieldpoint module that we are then writing out to tags on the Kepware OPC server which is connected to a Mitsubishi PLC network. If the PLC writes a value to the same device we are writing to, the device stays that value for time "X" (seems to be upward of a minute or more) before the fieldpoint value is written to the PLC device again resetting the value to the current actual value. The OPC device in Lookout is setup as OPC 1.0 (2.0 doesn't seem to work in Lookout), use asynchronous I/O, force refresh after write, reconnect automatically, update rate of 100 ms, deadband of 0.000 percent, no poll device, and no default access.
If we reopen Lookout, then the devices all get updated with the current values from the fieldpoint system.It looks like correct behaviour from your description.
For example, you have the connection OPClient.xxx.xxx = FieldPoint.xxx.xxx
Whenever the FieldPoint's data changes, it will be written to the Kepware through OPClient object. But it doesn't know if the data on OPC Server is changed by other source. The Lookout data will be output to OPC Server only when it changes in Lookout.
When the PLC writes a value to the same device or same address, Lookout doesn't know that it needs to write or reset the data again because the data source in Lookout doesn't change.
The problem I think is there are two sources that can write value to a same address. Maybe it's in need sometimes, but the confliction cannot be avoided.
Let me know if I misunderstand your description.
Ryan Shi
National Instruments -
Write Negative Value Byte to File
In this example, I'm trying to write a value in between -128 to 127 to a text file. When I read it back (and check it using a binary viewer), the text file actually gets 63. The only workable range is 0 to 127. How can I get negatives?
Byte b = (byte)-12;
BufferedWriter writer = new BufferedWriter(new FileWriter("C:\\Documents and Settings\\Joe\\Desktop\\test.txt"));
writer.write(b);
writer.close();
DataInputStream is = new DataInputStream(new FileInputStream("C:\\Documents and Settings\\Joe\\Desktop\\test.txt"));
System.out.println(is.read());
is.close();The byte became unsigned when using the OutputStream. I tried to write -12, and I got 244. But now, I can write 0 through 255 (a bigger range)
But I can just use arithmetic to make it work.
Thanks!
Byte b = (byte)-12;
OutputStream out = new FileOutputStream("C:\\Documents and Settings\\joe\\Desktop\\test.txt");
out.write(b);
out.close();
DataInputStream is = new DataInputStream(new FileInputStream("C:\\Documents and Settings\\joe\\Desktop\\test.txt"));
System.out.println(is.read());
is.close(); -
Hi,
I have a situation where I have to update the previous non empty date until there is non empty value. Then use the next non empty value. Data is sorted on group id.
for example I am creating new field which update the date column which just for example:
it would be great if there is way to implement using set operation not through cursor.
thanks in advance
Zaim Raza
http://zaimraza.wordpress.com/CREATE TABLE #C (X CHAR(1) ,Y INT)
INSERT INTO #C values(NULL, 1)
INSERT INTO #C values(NULL, 2)
INSERT INTO #C values(NULL, 3)
INSERT INTO #C values('A', 4)
INSERT INTO #C values(NULL, 1)
INSERT INTO #C values(NULL, 2)
INSERT INTO #C values('B', 3)
SELECT * FROM #C
ALTER TABLE #C ADD ID INT IDENTITY(1,1)
SELECT CASE WHEN X is not null
THEN X
ELSE (SELECT MIN(X)
FROM #C
WHERE ID >= t.ID)
END AS X,
Y
FROM #C t
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Passing multiple variable values through Start Pointer
Hi,
I have a company code variable in my BI query, at initial run of the VC model i want to exclude multiple company codes through start pointer, how can i write exclude condition for multiple values through company code variable field value input in start pointer, I don't want to change my BI query.
please help me on this
Thanks in advanceHi
This document will be usefull for you:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/07134c67-0b01-0010-0493-b89287cf330f
You should build string with following syntax and pass it to the start point:
:[Value(End - optional)]:Operator:I (Includes) or E (Excludes)
Available Operators:
· EQ u2013 Equal to
· GE u2013 Greater than or equal to
· GT u2013 Greater than
· LE u2013 Less than or equal to
· LT u2013 Less than
· BT u2013 Between
For more help:
http://help.sap.com/saphelp_nw70/helpdata/EN/44/4fc09c78ef4e35e10000000a1553f6/frameset.htm
Good luck,
Ola -
System.Exception: null or empty values
Have designed a 4 part form Using DW MX, ASP.NET C# and MySQL
and currently getting the below error when moving from one page to
the next.
The web.config file is on the server, there are no null or
empty values, and the key tags match.
I am new to applicaiton development in DW and am now stuck -
any suggestions?
System.Exception: This page has a MM:DataSet, MM:Insert,
MM:Update or MM:Delete tag with a null or empty value for the
ConnectionString and DatabaseType attributes.
Often, such values come from application settings in the
web.config file. That file might be missing from the server
executing this page. Or, it might be missing the particular add key
tags for the database connection this page uses. If you are using
Dreamweaver, look for the web.config file in the local root folder
of your Dreamweaver site. Once you find this file, you can either:
Put this file onto the server that is executing this page.
Copy the add key tags from the web.config in the local root
folder of your Dreamweaver site and paste them into the web.config
file in the server that is executing this page.
at DreamweaverCtrls.DataSet.DoInit()
Texthttp://java.sun.com/docs/books/tutorial/uiswing/components/spinner.html#model
Might be a good start. -
I created a report with multiple fields. I would like to create a generic formula in which it evaluates all the values and if it found a null or empty value it will be replaced by a 'N/A'. I was searching in the forums and I found the following formula
if (isnull() or ( ='')) then
"Display the required text"
else
when I tried to use it i had an error that the value must be boolean. Is there is a way where I can change all the fields as string?? and a assign "N/A"
or
how can I assign a "N/A"to a boolean field??
also I have approx. 140 fields to evaluate, does the formula can be generic or I will need to create a formula for each variable??
thanksUsually when Crystal runs across a field that is NULL, it immediately stops executing the formula, unless the field is enclosed within IsNull(). However, I'm not sure if that is the case for a parameter being passed to a function. So, you may be able to create a function like (Formula Workshop -> Create Custom Functions -> Add; basic syntax):
function DisplayString (inVal as string) as string
if (isnull(inVal) or (inVal ='')) then
DisplayString = "N/A"
else
DisplayString = inVal
end if
If Crystal does stop when passing a NULL value as a parameter, then you could code a similar function (without the isnull()), and check the Convert NULL Database Values to Default option on the File -> Report Options panel.
You would need to create one such function for each data type that you want to show "N/A" for, and for data types other than string, convert the value to a string when it is not null.
These functions could then be used in the Display String formula for the field on the report.
The only other way I can think of achieving this would be to base the report(s) on an SQL Command and convert NULL values to "N/A" there. It might be a bit easier to do in an SQL Command, but probably not a whole bunch.
Or, educate your users that when nothing is printed, it means that it's not applicable!
HTH,
Carl -
How to define null or empty value in BAPI function modules?
Hi,
I have problem with BAPI functions, where some parameters are mandatory.
For example: when I try to use HR BAPI's(BAPI_PERSDATA_CHANGE, etc.) I have to insert parameters like SUBTYPE,OBJECTID,LOCKINDICATOR. The PA0002 table that is used from this BAPI doesn't have SUBTYPE, OBJECTID, LOCKINDICATOR, for any of the records that I would like to select.
So what I tried, was to put a ' ', to indicate that is empty. It returned an error message saying "Make an entry in all required fields". Next tried to put in some values for these fields -- and it returned an error message saying "No data selected from 0002 for this period".
I also tried to run BAPI_FAMILY_CHANGE that uses data from table PA0021. Here I found some records with SUBTYPE, OBJECTID fields that were not empty, but LOCKINDICATOR was still missing. So I tried to put LOCINDICATOR value directly in to database (with MS SQL Enterprise Manager). After that I was able to use BAPI_FAMILY_CHANGE.
I think that manually inserting data in database is not normal procedure.
Is there something that I have missed out?
I mean -- how can I get this to work without inserting data directly in database?
How can I define null or empty value in BAPI function modules?
Thank you in advance.
Best regards,
MihailDefining an empty value for a parm in a table is easy.
First get the function's definition from the SAP system
Second only populate the fields for which you have a value to set
Third execute the function.
The JCO takes care of the rest.
Enjoy -
How can I pass empty value in URL Parameter
Hi,
I am passing different URL parameters to one page, to filter
the recordset on that page. How can I pass an empty value in the
URL parameter so that the recordset in unfiltered?
The URL parameter is based on one field of the database:
ContentType. So, the link would be to
default.asp?ContentType=Event
and then all records that have the ContentType field in the
DB as Event are displayed. Is it possible to use this system to
pass an empty parameter so that all records are displayed?
Thanks
Ian?ContentType=All
<% if (ContentType == "All")
Build recordset w/o filtering
ASP is rusty, but those are the basics.
"iandobie" <[email protected]> wrote in
message
news:e8im80$q7m$[email protected]..
> Hi,
> I am passing different URL parameters to one page, to
filter the recordset
> on
> that page. How can I pass an empty value in the URL
parameter so that the
> recordset in unfiltered?
> The URL parameter is based on one field of the database:
ContentType. So,
> the
> link would be to
> default.asp?ContentType=Event
> and then all records that have the ContentType field in
the DB as Event
> are
> displayed. Is it possible to use this system to pass an
empty parameter so
> that
> all records are displayed?
> Thanks
> Ian
> -
Error while trying to assign an empty value
Hi ,
In my bpel process i get an error while trying to assign an empty output to a variable. It occurs in assign activity copy operation. What can i do? How can i skip this? Sometimes there may be null /empty values ...below is the error message
Error in evaluate <from> expression at line "146". The result is empty for the XPath expression : "/ns5:getAccessSwitchResponse/SwitchPortInfo/SwitchID
Thanks in advance
Edited by: Turkmen Mustafa on 27.Haz.2011 04:08Hi,
No it is not possible. However this issue is resolved in SOA Suite 11g PS3. Where it uses BPEL WS 2.0 standards.
Edited by: user9285225 on Jun 27, 2011 4:42 AM -
UDF of type "Lookup" - doesn't accept "space/Empty" value in lookup defn
Hello there,
I have created a Combo Box UDF field - but I don't want to put any value in it. If I give only "space" in Encode and Decode - it gives error of providing some value to it. I want to give a default blank value over there along with other values so that the user is free to declare an empty value if he/she doesn't wants to provide one otherwise the user has to mandatorily provide some value to this like "NULL/zzz/NOTHING" as a string.
Is there anyway we can achieve this - giving blank value in a lookup/combo field ?
TIA,
- oidm.I don't think you can enter nulll/space in decode.
For Lookup Field Code as well as Decode can't be null.
If you want to give blank so it is not possible APMK, in decode you can give ---. You can treat it as Blank.
Code Key > NULL
Decode > --- -
Write up value - table to show each write up posted
Is there any table in asset accounting which shows write up values with individual write up postings made and its amount.
For ex: In ANLC we can see write ups.But if i have posted write up twice one with 10$ and another with 20$ .
ANLC shows in field ZUSNA(write up on ord dep) as $70.
Can i know a table which can show the split up.Please advice.Hi,
Please use the table ANEA & ANEP.
In ANEP you will have Transaction types for write up posted as 711.
And in ANEA you will have respective line item wise Write up posted values.
Hope this solve your issue.
Regards,
Pankaj.
Maybe you are looking for
-
I have an itunes account can i share with my husband iphone
I have an itunes account with my email address. my husband just got an iphone and I want to share my playlist on his iphone (which has a different email address) can this be done?
-
I restarted my computer but still have this issue. I changed the setting from "install updates automatically" to "never check for updates". clicked ok and then changed back to "install updates automatically". Tried to check for updates and still rec
-
I recently updated toitunes 10.6 but now it won't open as it says it stops working because of the Data Execution Prevention and i've followed the windows help and everything but still can't get it to work. i usually never have a problem when i update
-
In Adobe 6.5 I was able to use freeform motion path with distortion of the graphic to fly in the graphic can't see how to do that in Adobe cc premiere Pro CC I called up support and they said it's been transferred to after effects is that true?
-
Excise capturing problem after goods recept for import PO
Hi friends. excise details doesn't flow to the transaction of j1iex after receiving the goods in migo and capturing part one entry in excise tab for the import po. if i try to capture and post the excise during migo the whole excise values flows inth