We're using nodejs mcprotocol library to pole periodic data from Mitsubishi Electric PLC-FX5U-64M after every 1 minute and saving it to mongodb collection.
We've added 1 tag named as Tag_1 with configuration as
{
'tagname' : 'Tag_1',
'type' : 'number',
'address' : 'D10',
'tagsize' : 2
}
But when we read the tag value we're getting error of something went wrong writing values with status code and actual data as BAD 255.MC protocol BAD 255
Please refer to attached image for the same.
Thank you.
We've so far tried by changing the address series to test for another Tag of D sereis, but still the BAD 255 code continues.
Related
I'm making a simple survey program.
INSERT INTO sosang_survey_list (partner_id,survey_id,content,coupon_id,end_date,respon_cnt,start_date,state,title) VALUES (56177c09-cc8e-47fa-bfd6-fa316655ddde,f1ce1520-cdbd-11eb-b799-2112347ce13a,[{question:'test',choice_list:[{answer:'test',cnt:0},{answer:'test2',cnt:0}]}],null,'2021-06-15',0,'2021-06-15',false,'testeste');
I use the above write query on the client (node.js) server that uses a different IP than mine. (The 'content' column is nested of user defined types.)
Then, my spring server increments the 'cnt' of the 'content' column by 1 through an update query for that row. but it doesn't work. It is obviously increased in the query response shown by Spring Boot, but 'cnt' is still 0 in the actual DB.
I thought it was a consistency problem, so I tried setting the consistency option to 'qurom' on the node server and 'all' on my spring server, but the same symptom.
The current server configuration has three nodes, each operating on a different IP,
SimpleStrategy and replication_factor is 3.
please give me a hint..
Below is the 'content' column composed of user defined types..
[ {
"question" : "title",
"choice_list" : [ {
"answer" : "answer1",
"cnt" : 0
}, {
"answer" : "answer2",
"cnt" : 0
} ]
} ]
The reason cnt = 0 in the database is you are explicitly setting the value to zero here:
INSERT INTO sosang_survey_list
(...)
VALUES (..., [{question:'test',choice_list:[{answer:'test',cnt:0},{answer:'test2',cnt:0}]}],...)
If you have multiple clients/app instances writing to the database, they could be overwriting the row with zero over and over again. Cheers!
I am trying to store a graph created from Spark-dataframes with the project Cypher-for-Apache-Spark into neo4j.
When i run my code: which you can find it in the last comment in an issue in github
i get this error :
Exception in thread "main" org.neo4j.driver.v1.exceptions.DatabaseException: Unable to create CONSTRAINT ON ( ___neo4jgraphs874:___neo4jgraphs874 ) ASSERT ___neo4jgraphs874.___morpheusID IS UNIQUE:
Both Node(57) and Node(74) have the label `___neo4jgraphs874` and property `___morpheusID` = 4
any one knows why that happen ?
Solved here
I 've figured out what is the problem:
this error is fired because the dataframes have the same id numbers :
df1||df2||df3
0L||0L ||0L
1L||1L ||1L
2L||2L ||2L
to be fixed each dataframe need to have it's id differents from the other :
df1||df2||df3
0L||3L ||6L
1L||4L ||7L
2L||5L ||8L
I am using Dgrid OndemandGrid with Jsonrest store.On scrolling,I am taking 40 records from the database.
var grid= new OnDemandGrid({
store: jsonstore,
columns: Layout,
minRowsPerPage : 40,
maxRowsPerPage : 40,
loadingMessage: "Loading data...",
noDataMessage: "No results found."
}, "grid");
On first time ,I am getting the response Header as
Content-Range items=0-39/132
.On further scrolling ,the response Header is
Content-Range items=38-78/132 instead of 40-79/132.
Can someone tell me how to get the response as 40-79/132 , 80-119..etc..
Add queryRowsOverlap: 0 to the object you're passing to the grid constructor.
queryRowsOverlap defaults to 1, and is the reason the queries overlap. This property is intended to counteract issues with dojo/store/Observable "dropping" items at page boundaries, though it isn't a perfect solution.
I meet a problem with count request of neo4j with nodejs.
Here my problem :
When I insert a data, it will present like this:
start a = node(0)
create unique a-[:HAS_ID]->(b{id:'xx'})
create unique b-[:HAS_INFO]->(c{info:'xx'})
return a,b,c;
because it's unique node, so that it will not insert a new node if there are a same node exist. But, I wanna count how many request to call this query.
Ex :
request: -domain/id01/info
--return a node[0], b node[1] and c node[2]
add another data:
request: -domain/id02/info
-- return : a node[0], b node[3], c node[4]
call it again :
request: -domain/id01/info
--return a node[0], b node[1] and c node[2] //but here is any attribute or properties count to 2.
I've read any solution about strength. It told me create an properties of relationship as example :
[:HAS_INFO{strength:num}]
and let it increase but I still don't get it.
Anyone please give me solution and tell me how to do it.
Thank you.
more info : Representing (and incrementing) relationship strength in Neo4j
You can use the CASE statement, see http://gist.neo4j.org/?6052414 for an example. Feel free to for the underlying gist and improve it!
MATCH path=(a)-[rel:HAS_INFO]->(b)
WHERE a.name?='A' AND b.name?='Info'
SET rel.weight = (
CASE
WHEN not(has(rel.weight))
THEN 0
ELSE rel.weight + 1
END)
RETURN path, rel.weight;
I'm using collection form type, where children has datetime type input as single text. But when I submit data in validation fails and getErrorsAsString shows this strange error:
inputDateTime:
ERROR: This value is not valid.
date:
No errors
time:
No errors
Here is how I add my field
//form child
$builder->add('inputDateTime', 'datetime', array(
'date_widget' => 'single_text',
'time_widget' => 'single_text'
));
Why inputDateTime has errors but neither date or time has errors? My locale is set and I tried to add date format but it didn't help.
The "error_bubbling" property of the "date" and the "time" field is set to true, thus errors on those fields bubble up and are attached to the datetime field instead.
You are right that the error message is not very helpful (there's an open ticket for that) but you can debug the problem by printing the $exception variable in the block that catches the TransformationFailedException generated by the DataTransformer (Form.php:611). The exception contains the detailed error description, which is hidden from the end user for security purposes.
In fact it appears that is due to an invalid format date (when you are using a different format which can appears when you have set another timezone or locale for instance). As a result, you juste have to specify the date_format options for the datetime field.
In my case, this solve the issue :
'date_format' => 'dd/MM/yyyy',